Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize global watershed delineation for large watersheds #3668

Open
aufdenkampe opened this issue Jan 29, 2025 · 0 comments
Open

Optimize global watershed delineation for large watersheds #3668

aufdenkampe opened this issue Jan 29, 2025 · 0 comments

Comments

@aufdenkampe
Copy link
Member

The first step of watershed delineation is extremely fast, due to our implementation of the Modified Nested Set Index.

The second step -- dissolving the basin geometries for the delineated watershed in a custom boundary -- is increasingly slow with increasing watershed size and can lead to memory issues for very large watersheds.

@ptomasula and I anticipated this, and developed an additional set of performance optimizations to address it. As time and funding for our 2024 effort was winding down, we all collectively decided on a wait and see approach to determine if implementing the optimizations were necessary. We now know that they are! See:

Our two sets of optimizations are:

1. Pre-dissolve basins into Hydrologic Units (HUs) of ~200 basins.

As described in:

This pre-dissolve step has performance benefits (2-4x speedup) even if the pre-dissolve is done on-the-fly, and the implementation has a much, much smaller memory footprint! See WikiWatershed/global-hydrography#9 (comment)

2. Simpifly geometries for Hydrologic Units

As described in:

When the pre-dissolved HUs are saved as a separate layer, and especially if they are simplified, then the performance benefits are likely to be an additional 3-4x. See WikiWatershed/global-hydrography#7 (comment) and WikiWatershed/global-hydrography#11 (comment).

Last, the new global HUs could serve as a mechanism to cache watershed analysis results, similar to how we cache results for HUC12 polygons within CONUS. These 200-basin HUs from TDX-Hydro are between the size of a HUC10 and a HUC08.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant