dtarb / TauDEM

Terrain Analysis Using Digital Elevation Models (TauDEM) software for hydrologic terrain analysis and channel network extraction.
http://hydrology.usu.edu/taudem
Other
228 stars 116 forks source link

Different Threshold value might produce "holes" in the catchment #194

Closed WindingWinter closed 5 years ago

WindingWinter commented 5 years ago

By using the default Logan.tiff file and run the following command:

1. PitRemove.exe Logan.tif
2. D8FlowDir.exe -p Logan.tif -sd8 Logansd8.tif -fel Loganfel.tif
3. aread8.exe -p Loganp.tif -ad8 Loganad8.tif
4. Gridnet.exe -p Loganp.tif -plen Loganplen.tif -tlen Logantlen.tif -gord Logangord.tif
5. PeukerDouglas.exe -fel Loganfel.tif -ss Loganss.tif
6. aread8.exe -p Loganp.tif -wg Loganss.tif -ad8 Loganssa.tif
7.  Threshold.exe -ssa Loganssa.tif -src Logansrc.tif -thresh %threshold_val%
8.  Streamnet.exe -fel Loganfel.tif  -p Loganp.tif  -ad8 Loganad8.tif -src Logansrc.tif -ord Loganord.tif -tree Logantree.dat -coord Logancoord.dat -net Logannet.shp -w Loganw.tif

I found that the catchment produced is different for different value of %threshold_val%:

threshold50 This is for the case where %threshold_val%=50

threshold150 This is for the case where %threshold_val%=150

threshold300 This is for the case where %threshold_val%=300

I can understand the streamlines or even the outline shapes of the catchments are different when you use different %threshold_val%, but I can't understand why in some cases, there are missing catchments? ( as for the case for 50 and 150)?

dtarb commented 5 years ago

I think the internal holes you are seeing are an artifact of whatever visualization you are using. Here is the result I get

For 50 image

For 150 image

Along the edges you expect differences as if a stream leaves the domain with ssa value between 50 and 150 it will be mapped at 50 threshold, but not at 150 threshold, resulting in that catchment being out of the domain. But internal holes should not occur (unless you do not fill pits).

WindingWinter commented 5 years ago

I guess I know why-- the output from taudem is correct, what is not correct when I convert the raster output from taudem to vector via gdal.polygonize. There must be a bug in gdal.polygonize. Will try to scale down and file the problem later.