[GRASS-user] clip and rotate a raster

G. Allegri giohappy at gmail.com
Fri Jan 25 05:14:46 EST 2008


Hi Hamish, thanks for the hints. I've already tried using r.region, but it
seemed to me it just managed boundaries. How could it be used to shift xy?


2008/1/25, Hamish <hamish_b at yahoo.com>:
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20080125/11c6dcb6/attachment.html


More information about the grass-user mailing list