[GRASS-user] Problem with g.region in lat-lon projection
Moritz Lennert
mlennert at club.worldonline.be
Mon Nov 28 09:13:42 EST 2011
On 28/11/11 13:23, John A Stevenson wrote:
> Hi,
>
> I am trying to set up a grid with a specified resolution using
> g.region. The information about the grid that came with the data that
> I want to plot is: X grid origin: 0.2812500 Y grid origin: -89.81250
> X grid size: 640 Y grid size: 480 X grid resolution: 0.5625000 Y grid
> resolution: 0.3750000
>
> I set up the grid with the following command:
>
> GRASS 6.4.1 (global_ll_wgs84):~/NAME/G2011 > g.region w=0.2812500
> s=-89.81250 cols=640 rows=480 ewres=0.562500 nsres=0.3750000
>
> I would expect this grid to cover the whole globe (e.g.
> 640*0.5625=360), but instead it just generates a thin strip, and the
> ewres is too small.
>
If you have existing settings for e and n, it will keep those. You have
to use g.region -d to reset to default values (assuming your default
values are -180 - 180 & -90 - 90).
However, I think that g.region maxes out at 180E and 90N. When I use
your settings, I get the following:
GRASS 6.4.1 (LLWGS84):~ > g.region -d w=0.2812500 s=-89.81250 cols=640
rows=480 ewres=0.562500 nsres=0.3750000 -p
projection: 3 (Latitude-Longitude)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 90N
south: 89:48:45S
west: 0:16:52.5E
east: 180E
nsres: 0:22:28.59375
ewres: 0:16:50.917969
rows: 480
cols: 640
cells: 307200
or by aligning to resolution:
GRASS 6.4.1 (LLWGS84):~ > g.region -d w=0.2812500 s=-89.81250 cols=640
rows=480 ewres=0.562500 nsres=0.3750000 -pa
projection: 3 (Latitude-Longitude)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 90N
south: 90S
west: 0
east: 180E
nsres: 0:22:30
ewres: 0:16:52.5
rows: 480
cols: 640
cells: 307200
i.e. it adapts the resolution in order to get 640 columns between 0W and
180E.
Moritz
More information about the grass-user
mailing list