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

Accumulation disconnections #247

Closed
mirouml opened this issue Feb 29, 2024 · 4 comments
Closed

Accumulation disconnections #247

mirouml opened this issue Feb 29, 2024 · 4 comments

Comments

@mirouml
Copy link

mirouml commented Feb 29, 2024

chrome_NjixM5Cqwt

First thank you for awesome pysheds. I have a question, even though I am running:

    # Fill pits in DEM
    pit_filled_dem_grid = grid.fill_pits(dem)
    # Fill depressions in DEM
    flooded_dem_grid = grid.fill_depressions(pit_filled_dem_grid)
    # Resolve flats in DEM
    inflated_dem_grid = grid.resolve_flats(flooded_dem_grid)

I am still getting a lot of disconnections in accumulation (as pictured). DEM looks well treated with no visible problem, there is a clear path for the flow (though looking flat), but accumulation just stops for no obvious reason comparing to other locations which look completely same.

Is this a bug or something I can resolve by setting some parameters etc.?

@mdbartos
Copy link
Owner

I believe this may be related to #239

@groutr recently contributed a fix: #243

I can create a new release with this change, but until then try installing from the github repo

Btw, what are you using to visualize?

@mirouml
Copy link
Author

mirouml commented Feb 29, 2024

Thank you for the fast answer. I am not sure I am doing this right. I did:

pip install git+https://github.com/mdbartos/pysheds.git

Resolves to:

Resolved https://github.com/mdbartos/pysheds.git to commit 727c5216e4b00a6d96fe1823652945fa06dafaa3

This way I do not see any change after running script again.

For visualization I use ArcGIS Maps SDK for JavaScript (https://developers.arcgis.com/javascript/latest/) running in browser. There are a few steps and tweaks to achieve it though. All grids needs to be Cloud Optimized GeoTIFF (COG). Using SceneView class to display in 3D, for ground BaseElevationLayer class needs to be subclassed and tweaked etc.

@mdbartos
Copy link
Owner

mdbartos commented Mar 1, 2024

Hmm, when running resolve_flats, try using a smaller epsilon value i.e. resolve_flats(..., eps=1e-8) or smaller. Let me know if that changes anything.

@mirouml
Copy link
Author

mirouml commented Mar 3, 2024

Hmm, when running resolve_flats, try using a smaller epsilon value i.e. resolve_flats(..., eps=1e-8) or smaller. Let me know if that changes anything.

Thank you very much. Yes, that did the trick. Can't see any disconnections anymore. Perfect!

@mdbartos mdbartos closed this as completed Mar 3, 2024
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

2 participants