mdbartos / pysheds

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

Why stream network `LineStrings` do not pass through the centroid of each grid cell? #237

Open kasra-keshavarz opened 7 months ago

kasra-keshavarz commented 7 months ago

Problem

I've noticed that the build stream network in pysheds v0.3.5 does not cross the centroid of each grid cell (only if crossing diagonally), and uses the side of the cell. This is a bit of a pain, as it lowers the ability to overlap the stream network with any of the raster layers produced during the delineation process, and therefore, limits further analysis.

Examples

The following is an example of a stream network built using pysheds:

image

TauDEM as an instance, builds stream networks that pass through the centroid of each grid cell. Below is an example of a stream network built with TauDEM:

image

Question

Is there an option in pysheds that I can control this behaviour?

kasra-keshavarz commented 7 months ago

Just noticing #110