Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thank you for this. I have seen some comments about this, but my question then is how to connect my R code with my own OSRM server instead of the package's API. Do you know? Apologies if the question is trivial, im still wrapping my thoughts around all of it.
As I dig into the tool, I have a few questions. 1) can more than one function be used depending on the distance intervals? e.g. have a linear slope first, and a polynomial hole in the center (see option B, alboeit sloppily drawn). and 2) can a maximum depth be defined at which the function stops recalculating the abstraction? e.g. if abstraction = max_depth then abstraction = max_depth. Since I am not using Python, I guess I could at least infer the code and replicate it in R.
Based on the explanatory paper - wil the result be the same on a non-flat DEM? or should I first flatten the area on which to later apply the tool so that the depression is uniform?
@JonasV That seems to work like a charm in less than 4 minutes! but it created a new issue. I used gdalwarp("my_raster_file", dstfile = "path_to_save_new_raster", r = "bilinear", t_srs = "+proj=utm +zone=16 +ellps=GRS80 +datum=NAD83 +units=m +no_defs", overwrite = TRUE). The issue is that the resolution of the raster changes from ~10m to 27m. I guess I will have to define the new resolution in the line? If you see any other red flag in this command or something I am missing, please let me know. Thank you for your help.