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

Update clhs cost layer from raster package #13

Open
gcperk opened this issue Mar 14, 2023 · 3 comments
Open

Update clhs cost layer from raster package #13

gcperk opened this issue Mar 14, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@gcperk
Copy link
Contributor

gcperk commented Mar 14, 2023

Update the current method from gdistance to raster. Initially leastcostpath package was suggested, however this also relies on raster objects and is slow.

Code to be re-written in Terra package compatible.

@gcperk gcperk added the enhancement New feature or request label Mar 14, 2023
@kdaust
Copy link
Collaborator

kdaust commented Mar 15, 2023

The dev version of leastcostpath (from github) now uses terra instead of raster and is much faster! I'll work toward getting it done in that.

@gcperk
Copy link
Contributor Author

gcperk commented Mar 16, 2023

Ok great - I was looking at the cran version. I am working up a version with the github V.2.0 release. It seems much faster, just trying to work out how to incorporate the road speeds...

some relevant examples / notes here:

https://gis.stackexchange.com/questions/280197/working-out-travel-time-from-gdistances-conductance-values-in-r
https://mran.microsoft.com/snapshot/2014-11-17/web/packages/gdistance/vignettes/gdistance.pdf
https://gis.stackexchange.com/questions/280593/understanding-the-values-from-transition-layers-produced-by-the-r-package-gdist

@gcperk
Copy link
Contributor Author

gcperk commented Jun 9, 2023

Updated to new package least cost path, after testing this seems too generatizes and if not picking up the detail of the topography. Required digging into the calculations as to how the smoothing is generated (within the leastcost path package).
image
New version (see lower left corner for generalised costs)
image
Previous version using gdistance package (this is not 100% correct but notice the detail is much higher and closely related to topography).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants