Map-specific regions
Susan Huse
sue at ced.berkeley.edu
Tue Mar 8 17:26:20 EST 1994
> From grass-lists-owner at max.cecer.army.mil Tue Mar 8 13:24:32 1994
> From: Conn Copas <C.V.Copas at lut.ac.uk>
> Subject: Map-specific regions
> Sender: grass-lists-owner at max.cecer.army.mil
> Reply-To: grassu-list at max.cecer.army.mil
> To: grassu-list at max.cecer.army.mil
> Date: Tue, 8 Mar 94 20:06:16 GMT
> X-Mailer: ELM [version 2.3 PL0 (LUT)]
> Content-Length: 957
>
> GRASSrs
>
> I have to confess to having confused myself over region-handling, and could
> use some pointers. My understanding is this: the current region is stored in
> WIND, whilst map-specific regions are stored in 'cellhd' under the appropriate
> name. A high-level interface to all this is provided by 'g.region', which
> allows one to retrieve the default region, the current region, and map-specific
> regions. One obvious use of map-specific regions is during overlays; we want
> the overlay to conform to the original, not necessarily the current, region.
> So far, so good. The problem is that when I either run 'g.region' or look in
> 'cellhd', the region is invariably the default region (at least in release
> 4.0). I have a nagging feeling that I am confounding data and views here. Can
> someone set me straight? Secondly, is there any alternative means of
> enquiring about the region boundaries of a given map that is on display?
>
> Conn V Copas C.V.Copas at lut.ac.uk
>
WIND is your current region
DEFAULT_WIND in mapset PERMANENT is the default window for the whole location.
the information stored in the cellhd/ file are the region used to create that
cell file. If these correspond to the DEFAULT_WIND, they were made when a
user had the default as her/his current region. If you use g.region rast=
rasterfile, your current region will be reset to correspond to the region
stored in the cellhd file.
files stored under windows are saved regions that can be called at any time.
When displaying or using analysis tools (d.rast, r.mask, r.mapcalc, r.report,
etc) the raster files are translated to the current region. I believe
GRASS uses a center of cell algorithm. One should bear in mind how well
regions will align. For instance a map made at a resolution of 33 meters
and a map made at a resolution 25 meters won't translate well to a common
region. Maps at 25 meter and 50 meter, on the other hand, will.
If you want to know the region of a currently displayed map:
1) g.region -p will tell you the current region - which is (unless
you just changed regions) the region that you used to display the map -
the region you are seeing.
2) g.region rast=rasterfile; g.region -p will change to the region
used to create the raster file and then tell you what it is. Otherwise
more ...../cellhd/rasterfile. I don't know of a better way.
-Sue Huse
CEDR - REGIS
UC Berkeley
More information about the grass-user
mailing list