terra icon indicating copy to clipboard operation
terra copied to clipboard

Add geomorphon and wetness index calculations to `terrain()`

Open kevinwolz opened this issue 1 year ago • 6 comments

Any plans to add geomorphon and wetness index calculations to terrain()? These are currently possible only via the package qgisprocess as described HERE? Adding directly functionality within terra would be great!

kevinwolz avatar Feb 24 '24 19:02 kevinwolz

Worth noting that there is a geomorphons and wetness index function in the WhiteboxTools R package: wbt_geomorphons and wbt_wetness_index. Not that this precludes them from being added to terra!

jflowernet avatar Feb 29 '24 05:02 jflowernet

Cool! It looks like both the whitebox approach and the qgisprocess approach that I linked to require connection to separate GIS software installed on your computer. Do you think that would be required if these methods were added to terra as well? Or could terra implement internally?

kevinwolz avatar Mar 01 '24 15:03 kevinwolz

That's a question for terra developer Robert! Hopefully he sees this issue.

jflowernet avatar Mar 04 '24 23:03 jflowernet

Note that the tools in terrain() are originally implemented in GDAL, which {terra} just wraps. If we want to avoid new dependencies in {terra}, that means someone has to write these new functions.

Edit: My mistake. I thought GDAL was used for this purpose, but that is implemented separately (https://github.com/rspatial/terra/blob/master/src/distRaster.cpp).

kadyb avatar Mar 05 '24 10:03 kadyb