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

Maximum DEM size for slope calculation? #55

Open
JamesSample opened this issue Jun 30, 2022 · 0 comments
Open

Maximum DEM size for slope calculation? #55

JamesSample opened this issue Jun 30, 2022 · 0 comments

Comments

@JamesSample
Copy link

JamesSample commented Jun 30, 2022

Is there a limit to the size of the grids that can be handled by the slope calculations in rd.TerrainAttribute?

I'm attempting to calculate a slope map from the ArcticDEM datasets. Using the 1 km resolution grid works fine, but the 100 m resolution grid is incorrectly truncated.

The 1 km dataset is here (87 MB compressed; 220 MB in memory) and the 100 m dataset is here (7.8 GB compressed; 22 GB in memory).

A notebook illustrating successful processing of the 1 km dataset is here. However, with the higher resolution data I get the following:

import richdem as rd

dem_path = r"./arcticDEM/arcticdem_mosaic_100m_v3.0.tif"
dem = rd.LoadGDAL(dem_path)
rd.rdShow(dem, axes=False, cmap="terrain", figsize=(8, 5.5));

image

slope = rd.TerrainAttribute(dem, attrib="slope_degrees")
print("Max. slope:", slope.max(), "degrees.")
rd.rdShow(slope, axes=False, cmap="magma", figsize=(8, 5.5));

image

Does anyone have any suggestions for settings I can tweak to avoid the lower portion of the slope map being truncated like this, please? Or ideas for possible causes?

I have access to a large machine (960 GB of RAM). My code all completes without error and peak memory consumption is never more than about 150 GB, so I'm not running out of memory.

Any suggestions gratefully received!

Thanks :-)

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