Open tlohde opened 1 year ago
Thank you for reporting. Did you try out the example notebook to see if it has the same issue? I suspect that might just be a raster-vector conversion issue rather than the lidar package
https://colab.research.google.com/github/giswqs/lidar/blob/master/examples/lidar_colab.ipynb
I can't seem to make the issue appearin the example notebook. I changed the sink parameters to:
min_size = 20
min_depth = 0.5
interval = 0.2
in order generate more regions, and the region-id
appears to be consistent between the two.
I will have a closer look at my DEM and the raster-vector conversion. As it is, I think the spatial join is good enough for my needs.
Probelm solved/identified (i think)
The issue arose because regions of my DEM has regions where elevations are < 0 (and they are supposed to be, as I am dealing with a DEM that includes some ocean bathymetry). These areas were identified by ExtractSinks()
, but not DelineateDepressions()
, i.e. the there were a different number of unique region-ids in regions.shp/regions.tif
and in depressions.shp/depressions.tif
ExtractSinks()
I have tried to follow what DelineateDepressions()
is doing, and i think, a solution might be to allow level_image
to be < 0.
Thank you, tlohde
Firstly, thank you for providing an excellent package/resource.
Description
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
region-id
values inregions.shp
/regions_info.csv
that is generated usingExtractSinks()
differ from those in thedepressions.shp
/depressions_info.csv
generated usingDelineateDepressions()
.region-id
to be consistent between these.What I Did
at this stage I would expect the
region-id
inregions
to match that ingdf
...however, they do not. Below is an illustration, which I think also provides a way to handle the discrepency (spatial join)the question
So, i think the question is... is the discrepency between the two
region_id
s expected/normal? If yes, is the use of.overlay()
the best way to handle it and reconcileregions.shp
/regions_info.csv
anddepressions.shp
/depressions_info.csv
, or is there an even more straightforward way? If no, have I done something wrong?thank you