[GRASS-user] [GRASSLIST:1183] how to rotate raster in GRASS ?

Jarek Jasiewicz jarekj at amu.edu.pl
Thu Aug 31 12:29:09 EDT 2006


Pierluigi De Rosa napisa?(a):
> Thanks Jarek for your answer!!
>
> Yes I have to rotate a DEM, so I wont to lose the orientation North South...
> I would to rotate a DEM of a specific angle.
>
> R can do it?
> After importing DEM in R which is the R command to rotate a spatial data 
> frame??
>
> Pierluigi
>   
I have did it on that way:


DEM imported you will have as SpatialGridDataFrame
1) convert it to matrx

matrix=as.matrix(yoDEM)

2) next transpose it

tmatrix=t(matrix)

3) see what you have:

image(tmatrix)

that all - convert it to data grame again, or export from srictly from R

but if you want rotate to spacific angle - for example 37 grads hmmm....

this is not a way

mayby try georeference .... but aI'm not sure about result

As I remember ArcView/Info has posibilities to rotate raster during 
georeferencing mayby use it...

regards

Jarek




More information about the grass-user mailing list