[GRASS-user] Help with reprojection

Alex Bernstein pofig37 at gmail.com
Fri Jan 2 14:04:44 EST 2009


Hi,

I'm new to GRASS, and am having trouble with reprojection. I've spent
two days trying to figure this out, and I feel that I'm close, but
reprojection is still failing. Could anyone clue me in what I'm
missing?

The input data set is Natural Earth II map of the world
<http://www.nacis.org/data/NE2/NE2_WDB1.jpg> 16200x8100 JPG in plate
carrée projection. I need to reproject it into Lambert azimuthal
equal-area projection centered on N0 E15. I'm using WinGRASS 6.3.0.

First, I've created GRASS location "geographic" with following region
and projection:

> g.region -p
projection: 99 (Equidistant Cylindrical (Plate Caree))
zone:       0
datum:      wgs84
ellipsoid:  wgs84
north:      8100
south:      0
west:       0
east:       16200
nsres:      1
ewres:      1
rows:       8100
cols:       16200
cells:      131220000

> g.proj -p datumtrans=0
PROJ_INFO-------------------------------------------------
name       : Equidistant Cylindrical (Plate Caree)
datum      : wgs84
towgs84    : 0.000,0.000,0.000
proj       : eqc
ellps      : wgs84
a          : 6378137.0000000000
es         : 0.0066943800
f          : 298.2572235630
lat_0      : 0.0000000000
lat_ts     : 0.0000000000
lon_0      : 0.0000000000
-PROJ_UNITS------------------------------------------------
unit       : meter
units      : meters
meters     : 1.0

I then imported the JPG map, which got split into color channels and
composed the channels together into single map.

After, I created a new location "lambert":
> g.region -p
projection: 99 (Lambert Azimuthal Equal Area)
zone:       0
datum:      wgs84
ellipsoid:  wgs84
north:      8100
south:      0
west:       0
east:       16200
nsres:      1
ewres:      1
rows:       8100
cols:       16200
cells:      131220000

> g.proj -p datumtrans=0
-PROJ_INFO-------------------------------------------------
name       : Lambert Azimuthal Equal Area
datum      : wgs84
towgs84    : 0.000,0.000,0.000
proj       : laea
ellps      : wgs84
a          : 6378137.0000000000
es         : 0.0066943800
f          : 298.2572235630
lat_0      : 0.0000000000
lon_0      : 15.0000000000
x_0        : 0.0000000000
y_0        : 0.0000000000
-PROJ_UNITS------------------------------------------------
unit       : meter
units      : meters
meters     : 1.0

Finally, when I try reprojection I get "Input raster map is outside
current region" error:
> r.proj input=NE2 location=geographic mapset=PERMANENT method=cubic
Input Projection Parameters:  +proj=eqc +lat_0=0.0000000000
+lat_ts=0.0000000000 +lon_0=0.0000000000 +a=6378137 +rf=298.257223563
+no_defs +towgs84=0.000,0.000,0.000
Input Unit Factor: 1
Output Projection Parameters:  +proj=laea +lat_0=0.0000000000
+lon_0=15.0000000000 +x_0=0.0000000000 +y_0=0.0000000000 +a=6378137
+rf=298.257223563 +no_defs +towgs84=0.000,0.000,0.000
Output Unit Factor: 1
Input raster map is outside current region

How can I make this work?
Thanks,
Alex


More information about the grass-user mailing list