[R-sig-Geo] Slope and Aspect calculations in R

Thomas Adams Thomas.Adams at noaa.gov
Fri Jul 10 15:11:35 CEST 2009


Josh,

I use R & GRASS together on both MacOS X and Linux without problems. 
It's very direct to write a shell script that calls both R & GRASS 
within a single script. Writing a R script that calls GRASS may be more 
tedious to do what you want. Writing a shell script that calls both may 
be the wat to go.

Tom

Josh London wrote:
> Thanks for the suggestions so far regarding the use of GRASS or SAGA.
>
> We have considered those options but SAGA doesn't appear available for 
> MacOS. My understanding is that spgrass6 is more for accessing R 
> code/functions from within GRASS vs accessing GRASS functions from 
> within R. We have all our other analysis coded up in R, and just need 
> these functions to do one part of a bigger process. Maybe I'm 
> misunderstanding how to use R and GRASS together. I'll do some further 
> research.
>
> Thanks again
> Josh
>
> Josh London wrote:
>> Hello
>>
>> We are looking to mimic, in R, the slope (max magnitude difference 
>> between a cell and its neighbors) and aspect (direction of maximum 
>> magnitude difference) functions found in ESRI's Spatial Analyst 
>> package. We were just about to code up the slope function but thought 
>> I would make sure we weren't re-inventing any wheels already out there.
>>
>> Thanks
>> Josh
>>
>


-- 
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL:	thomas.adams at noaa.gov

VOICE:	937-383-0528
FAX:	937-383-0033



More information about the R-sig-Geo mailing list