[GRASS-user] clip and rotate a raster
Hamish
hamish_b at yahoo.com
Thu Jan 24 20:39:49 EST 2008
G. Allegri wrote:
> I don't have a raster that fits my region.
this will do it:
r.mapcalc 'regionrast = 1'
> The unsolved problem is rotation (and shift): making affine
> tranformations using just a x-shift and y-shift parameter, and a
> rotation angle having set a point as origin (or just around the
> "center" of the raster).
some ideas.
simple translation without rotation: r.region
90 deg rotation / flipping:
r.out.mat -> Matlab or GNU Octave.
ML>> array_rot = orig_array' ;
% flip array left-right or up-down
ML>> array_flip = fliplr( flipud( orig_array ) ) ;
r.in.mat
for rotation by angle you could do more complicated stuff in Matlab.
In GRASS i.rectify may be an option.
Hamish
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
More information about the grass-user
mailing list