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
--
Dr John A Stevenson
RSE/Scottish Government Personal Research Fellow
(co-funded by Marie Curie Actions)
School of GeoSciences
The University of Edinburgh
Grant Institute
West Mains Road
Edinburgh EH9 3JW
Scotland
PHONE: (+44) 131 650 7526
FAX: (+44) 131 668 3184
email: john.stevenson@ed.ac.uk
web: http://www.geos.ed.ac.uk/homes/jsteven5
blog: http://all-geo.org/volcan01010
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
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 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:
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 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 think GRASS prefers to have all the extents n,s,e,w and either
rows/cols or resolution to calculate a region.
With the information available,
North = -89.81250 + 480 * 0.375 = 90.1875
Interestingly, the North deviation from 90N and the South deviation
from 90S is 0.1875 = 0.375 / 2, half a cell
East = 0.2812500 + 640 * 0.5625 = 360.28125
Interestingly, the East deviation from 360E and the West deviation
from 0 is 0.28125 = 0.5625 / 2, half a cell
It is therefore possible that the true region extents are n=90 s=-90
w=0 e=360 and that X and Y grid origin refer to the center, not the
corner of the lower left cell.
This should work:
g.region n=90 s=-90 w=0 e=360 rows=480 cols=640 -p
and
r.region map=<my_map> n=90 s=-90 w=0 e=360