Skip to content

Wrong depression ID in outputted depressions.shp and level shapefiles #23

@geotom

Description

@geotom

Description

When delineating depressions I use the following

sink_path = ExtractSinks(
    './test/dem.tif',
    1,
    './output'
)
DelineateDepressions(
    sink_path,
    1,
    0.5,
    0.2,
    './output'
    True
)

This runs through and produces me the general sinks (regions.shp) and the nested depressions (depressions.shp, depressions_info.csv). I understand the relation between both and want to assign to each region all the associated depressions and their geometries by looping through all the regions (ID's) and assigning them every depression (getting info from the depressions_info.csv). But I stumbled upon an issue where I cannot associate depressions by their IDs to the according poygon geometry, because the depressions.shp IDs are wrong. While I have enumerated all depressions correctly in the CSV file, the depressions shapefile has an very strange (and I assume wrong) numbering. At least most IDs fit, but I have for the level 1 depressions suddenly hundreds of depressions all having the depression ID 1. The rest of the polygons all have the correct depression ID, which relates tothe same ID in the depressions_info.csv file.

image

The same can be seen when looking at the individual level shapefiles. For level 1, I have a lot of polygons all with the same depression ID = 1

image

This does not allow to associate a geometry to a depression via its ID. I guess 1/50 or 1/100 of my depressions (and only those of level 1) have the wrong depression ID set to 1.

image

Do I misunderstand something or is this a bug in lidar? I assume, the polygons in level 1 are written to the shapefiles with an inccorect ID of 1 instead of the depression ID from the CSV file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions