I need to calculate slope at different scales. In the case below, r is a
0.5deg resolution raster and I want the slope for 1.5 deg centered on each
of those 0.5 deg pixels. I'm trying to estimate which side of mountain
range each pixel is on. So the resulting raster would have the same number
of pi
Dominik,
r <- raster(nrows=22, ncols=20, xmn=-58, xmx=-48, ymn=-33, ymx=-22)
vals <- sample.int(1e3,440)
r[ ] <- vals
#raster::terrain
terr_r <- terrain(r, opt='slope', unit='degrees', neighbors=8)
Ah, but it appears you want up sampling to 1.5 degrees rather than 0.5 deg.
so maybe spatial.tools:
Thanks for the suggestion Chris. I'm familiar with gdaldem, which
raster::terrain is based on, to compute slope from a dem. I now realize
that my example isnt a good one because neighbors=8 would achieve what I
described. However I actually want some flexibility such that I can
specifiy neighbors=
Dominik,
If you want to deal with bigger data sets in a fast and more flexible way I
strongly suggest to use GRASS7. Rgrass7 provides a very good "r-ish" wrapper to
use it from R. If You are interested i 'll post a typical setup and example for
your question. Please note you need obligatory a G
Dominik,
Sorry, I'm still trying to understand your 0.05 to 1.5 degree part of your
problem.
Otherwise, I think you are limited to 8 neighbors as this reflects the
documentation as I read it.
Even Roualt perhaps would be up in arms; but, there's nothing saying you
can't do a 16 vs 8 neighbor. You
Chris R,
I'd be happy to use grass7 but I can't get it to run on my mac. osx
10.11.3. I have a working qgis from kyngchaos, installed pandoc and cairo
on top of that, and disabled sip but the grass7.app just hangs when I try
to open it.
Chris E,
I will try to clarify. Rather than thinking about "si
Dominik,
There's mention of grass not working on osx 10.11 and a work around
grassmac.wikidot.com
I was generally using PCRaster when I was doing watershed/flood
re-creations to handle the watershed delineations and the like and don't
have an opinion on Grass.
Yeah, that transect was maybe a sill
Dominik,
probably I did not catch exactly what are your issues.
If you want to perform a multiscale analysis of the digital relief you
should not focus on a 4,8,16 or more neighbors analysis. This would be
helpful for a least cost path analysis or a single scale but multi
neighborhood analysi