[GRASS-user] Invalid region and coordinates when trying to reproject.

Hamish hamish_b at yahoo.com
Sun Jul 1 15:30:59 PDT 2012


Marcello wrote:
> I use v.in.region to get the region as a vector, v.proj in a
> mercator location and then g.region to the projected vector,
> before applying r.proj to my raster.

note r.proj in current versions of GRASS has some new flags
which mean you don't need to do the location switching and
v.in.region trick any more:
  -p   Print input map's bounds in the current projection and exit
  -g   Print input map's bounds in the current projection and exit (shell style)

run with the -g flag, apply that to g.region, look at g.region -p,
pick a suitable resolution, apply with 'g.region res= -a' (or if
lat/lon source maybe differing ewres= and nsres=), then r.proj
again.


> # reduce region by 1 cell
> g.region rast=etopo1_bed_g
> eval `g.region -g`
> g.region n=n-$nsres s=s+$nsres e=e-$ewres -p

following here?
  http://grass.osgeo.org/wiki/Global_datasets#ETOPO_.28DEM.29


Hamish



More information about the grass-user mailing list