Dear GRASS Team
I am running a global analysis where I need to use “tiles” as computational units in which I use the following three commands:
r.watershed -b elevation=elv depression=dep accumulation=flow drainage=dir_rw flow=pixel_area memory=100000 --o --verbose
r.stream.extract elevation=elv accumulation=flow depression=dep threshold=0.05 direction=dir_rs stream_raster=stream memory=100000 --o --verbose
r.stream.basins -l stream_rast=stream direction=dir_rs basins=lbasin memory=100000 --o --verbose
The basins that were not completely within a tile (resulting in broken-basins) have been removed (see below the three tiles in Figs. 1,2,3 including only entire basins),
and now I’m in the phase of merging all the tiles having only complete basins.
When I merge the tiles (Fig 4), some basin borders do not match perfectly, and some areas have NoData (see Fig 5,6) or have the Basin ID of the below basin (Fig 7).
I noticed that these phenomena appear only when I merge tiles that have very large broken-basins that can not be included in the tile due to RAM limitations.
My thought is that r.stream.basins needs the entire dimension of two adjacent basins to be able to detect the border without gap and without a potential random selection.
Is there any part of the r.stream.basins code that I can potentially check and eventually hack to avoid this problem?
For the rest, all the RAM limitation and other problem have been solved soon we will have a global stream network and basin delineation performed 100% in GRASS!!!
Thank you
Best Regards
Giuseppe
Fig 1. Left Tile
Fig 2. Center tile
Fig 3. Right Tile
Fig 4. Merge all the tiles
Fig 5. Gap → small white area
Fig 6. Gap → small white area
Fig 7. boarder Basins inconsistency among tiles
–
Giuseppe Amatulli, Ph.D.
Research scientist at
School of Forestry & Environmental Studies
Center for Research Computing
Yale University
New Haven, CT, USA
06511Teaching: http://spatial-ecology.net
Work: https://environment.yale.edu/profile/giuseppe-amatulli/