[GRASSLIST:7293] Re: transform rasters

Glynn Clements glynn at gclements.plus.com
Fri Jun 24 04:52:02 EDT 2005


Hamish wrote:

> > > Has someone written a function like r.shift or r.transform ?
> > > 
> > > I just want to move a raster file in x and/or y direction (in map
> > > units or cell sizes).
> > 
> > Shifting a map by a fixed number of cells is easy enough with
> > r.mapcalc, e.g.:
> > 
> > 	r.mapcalc 'outmap = inmap[10,5]'
> > 
> > will result in outmap being shifted 10 cells up and 5 cells left
> > relative to inmap.
> 
> Is r.region appropriate?

r.region modifies an existing map in-place. It is intended for the
situation where a map is imported in the wrong location (e.g. due to
missing or incorrect georeferencing data).

The r.mapcalc approach will create a shifted copy of an existing map
without changing the original map.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list