mdbartos / pysheds

:earth_americas: Simple and fast watershed delineation in python.
GNU General Public License v3.0
702 stars 188 forks source link

Any ideas why the catchment delineated has holes? How can I filled the holes? #224

Open staceyzhang-cbcl opened 11 months ago

staceyzhang-cbcl commented 11 months ago

I was testing the functions with two DEM files. Both catchments I delineated with a randomly picked pour point had holes in them where I dont think there should be. How do I eliminate them? Did I do something wrong?

For the first DEM, I filled pits, depressions and resolved flats. The first two was good, with assert not depressions.any()/pits.any() returning nothing. But the flats seemed not resolved. Could it be the reason?

Thank you!

image image

mdbartos commented 11 months ago

Greetings. When running resolve_flats, try setting a lower epsilon value, e.g.:

resolve_flats(..., eps=1e-7)
staceyzhang-cbcl commented 11 months ago

Thanks so much for your quick response!

This solved one of my two DEM problems. The second DEM still has one hole (but not two, I take that as a partial success). I wonder how low the epsilon value can be. I tried eps=1e-11 but it still didn't resolve all flats.

mdbartos commented 11 months ago

@Eric-Jenkins : Could be a good test case to look at.

@staceyzhang-cbcl : Are you able to send the DEM?

staceyzhang-cbcl commented 11 months ago

I tried. But the file is too large to upload. It's 125MB after compression.

staceyzhang-cbcl commented 11 months ago

OK, I uploaded it to my google drive.

The pour point is 576410.1845, 5048888.3975.