xdem
xdem copied to clipboard
xdem.terrain.profile_curvature takes ~100x longer than expected
import xdem
refdem = xdem.DEM(xdem.examples.get_path("longyearbyen_ref_dem"))
%time test = xdem.terrain._get_terrainattr_richdem(refdem, "profile_curvature")
%time test = xdem.terrain.profile_curvature(dem=refdem, use_richdem=True)
%time test = xdem.terrain.get_terrain_attribute(dem=refdem, attribute="profile_curvature", use_richdem=True)
The first option takes 67 ms while the second and third take 7.5 s ! But when running the commands a second time, they both speed-up by a factor 10. However, I did not see that effect with another larger DEM I tested.
While looking at this issue, it would be great to add a silent
argument to remove the outputs of richdem.