WikiWatershed / global-hydrography

Scripts to explore and process global hydrography (stream lines and basin boundaries) for Model My Watershed
MIT License
1 stars 0 forks source link

Implement Modified Nest Set Index for Rapid Watershed Delineation #3

Closed ptomasula closed 3 months ago

ptomasula commented 4 months ago

Summary

The paper Development of a data model to facilitate rapid watershed delineation proposes a graph algorithm based approach for watershed delineation using a modified nested set index. The outlined approach would allow selection of upstream reaches from a given node (reach) based on two numerical indices, in place of more conventional techniques like adjacency lists or binary search.

Closure Criteria

ptomasula commented 4 months ago

Thanks @aufdenkampe for connecting and helping debug this issue. As noted in the commit message for b21c352, the previous implementation's conversion from a GeoDataFrame into a dictionary and back again was resulting in the loss of critical type information (e.g. CRS). As a result, the write method was not able to function correctly. The example notebook should be working now.

aufdenkampe commented 3 months ago

The final revisions to examples/3_GenerateModifiedNestedSetIndex.ipynb with commit cb245a08bef4ac5f07137d5157619dfe7eb06185 closes this issue by providing the create_tdx_mnsi() function that provides a performance and storage optimized approach that: