-
Notifications
You must be signed in to change notification settings - Fork 2
v0.7 upgrade #41
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
v0.7 upgrade #41
Conversation
|
@alex-s-gardner For which curvatures (plan, profile, contour) do you want to use the direction argument? Do you have something working currently? |
| function _crstrait(dem::Raster) | ||
| crs = Rasters.crs(dem) | ||
| acrs = ArchGDAL.importCRS(crs) | ||
| Bool(ArchGDAL.GDAL.osrisgeographic(acrs.ptr)) && return Rasters.GI.GeographicTrait() | ||
| Bool(ArchGDAL.GDAL.osrisprojected(acrs.ptr)) && return Rasters.GI.ProjectedTrait() | ||
| return Rasters.GI.UnknownTrait() | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rafaqz @tiemvanderdeure Ideally we implement crstrait on Rasters itself. And there is a cellarea method, but ideally we have the underlying cellsize (resolution?) as well. If we get a unit with that, even better.
I missed your earlier ping: I currently use directional profile curvature... instead of calculation curvature along maximum slope I calculate it along a direction. |
Do you have a code example/snippet? My code is here: https://github.com/Deltares/Geomorphometry.jl/pull/41/files#diff-5e200c4ade1e6d95f1c218e8fa25406ee2b424c81f5dff53ecc59c1c641adc4fR295-R334, can be a bit hard to follow. A direction of 0 degrees is north. Might be best to just plot and compare, and see whether they're similar. |
So in my work I was only calculating curvature along the x and y directions only so my stencil looked like this: where |
|
That's only the dz/dx and dz/dy calculation (so slope, not curvature?). Docs are now live at https://deltares.github.io/Geomorphometry.jl/dev/usage#curvature |
|
It's curvature as it subtracts the central value It's But not worth spending any time on ... i use it to identify correlated biases in DEMs so I only use it as a relative metric of curvature... not something you should replicate... sorry for the confusion |
These docs are so impressive... what a great package! |
Well, it's already in. It was named |
[0.7.0]
Added
cellsizefor all methdos using that kwarg, taking into account geographical data (lat/lon).filldepressions,flowaccumulation, with different algorithms (D8, DInf, FD8) available via themethodkwarg.windowkwarg for a Stencil from Stencils.jl package.BPIas a relative terrain operation.plan_curvature,profile_curvatureandcontour_curvature, while deprecatingcurvatureforlaplacian.radiuskwarg to curvature methods.CHANGELOG.mdChanged
methodkwarg.Fixed
Arrayinput toAbstractArrayforopening