[GRASS-SVN] r29868 - grass/trunk/general/g.region/cmd
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jan 27 22:33:38 EST 2008
Author: hamish
Date: 2008-01-27 22:33:38 -0500 (Sun, 27 Jan 2008)
New Revision: 29868
Modified:
grass/trunk/general/g.region/cmd/description.html
Log:
modernization
Modified: grass/trunk/general/g.region/cmd/description.html
===================================================================
--- grass/trunk/general/g.region/cmd/description.html 2008-01-28 02:45:57 UTC (rev 29867)
+++ grass/trunk/general/g.region/cmd/description.html 2008-01-28 03:33:38 UTC (rev 29868)
@@ -1,6 +1,6 @@
<h2>DESCRIPTION</h2>
-The <em>g.region</em> program allows the user to manage the
+The <em>g.region</em> module allows the user to manage the
settings of the current geographic region. These regional
boundaries can be set by the user directly and/or set from
a region definition file (stored under the
@@ -30,55 +30,66 @@
The region's boundaries are given as the northernmost,
southernmost, easternmost, and westernmost points that
-define its extent. The north and south boundaries are
-commonly called <em>northings</em>, while the east and west
+define its extent (cell edges). The north and south boundaries
+are commonly called <em>northings</em>, while the east and west
boundaries are called <em>eastings</em>.
<p>
The region's cell resolution defines the size of the
smallest piece of data recognized (imported, analyzed,
-displayed, stored, etc.) by GRASS programs affected by the
-current region settings. The north-south and east-west
-cell resolutions need not be the same, thus allowing
-non-square data cells to exist.
+displayed, stored, etc.) by GRASS modules affected by the
+current region settings. The north-south and east-west cell
+resolutions need not be the same, thus allowing non-square
+data cells to exist.
+<P>
+Typically all raster and display modules are affected by the current
+region settings, but not vector modules.
+Some special modules diverge from this rule, for example raster import
+modules and <em>v.in.region</em>.
+
+
<dt><b>Default Region:</b>
-<dd>Each GRASS <kbd>LOCATION_NAME</kbd> has a fixed
+<dd>Each GRASS LOCATION has a fixed
geographic region, called the default geographic region
(stored in the region file <kbd>DEFAULT_WIND</kbd> under
the special mapset <kbd>PERMANENT</kbd>), that defines the
extent of the data base. While this provides a starting
point for defining new geographic regions, user-defined
geographic regions need not fall within this geographic
-region.
+region. The current region can be reset to the default region
+with the <b>-d</b> flag. The default region is initially set
+when the location is first created and can be reset using the
+<b>-s</b> flag.
-
<dt><b>Current Region:</b>
<dd>Each mapset has a current geographic region. This
region defines the geographic area in which all GRASS
-displays and analyses will be done. Data will be
+displays and raster analyses will be done. Raster data will be
resampled, if necessary, to meet the cell resolutions of
the current geographic region setting.
-<dt><b>Region Data Base:</b>
+<dt><b>Saved Regions:</b>
<dd>Each GRASS MAPSET may contain any number of
pre-defined, and named, geographic regions. These region
definitions are stored in the user's current mapset
location under the <kbd>windows</kbd> directory (also
-referred to as the user's data base of region
-definitions). Any of these pre-defined geographic regions
+referred to as the user's saved region definitions).
+Any of these pre-defined geographic regions
may be selected, by name, to become the current geographic
region. Users may also access saved region definitions
stored under other mapsets in the current location, if
these mapsets are included in the user's mapset search
-path.
+path or the '@' operator is used (<tt>region_name at mapset</tt>).
</dl>
+
+<!-- interactive mode no longer available, moved to startup ...?
<h2>REGION EDIT PROMPT</h2>
Most of the options will require the user to edit a
@@ -201,7 +212,7 @@
Alternately, the user can modify the settings of the current geographic region
by specifying all needed parameters on the command line.
-<!--
+
The user enters the command <b>g.region</b> <em>parms</em>, where
<em>parms</em> are the following parameters and/or flags:
@@ -300,18 +311,22 @@
<dt><b>ewres=</b><em>value</em>
<dd>Set east-west grid resolution value to <em>value</em>
+-->
-<a NAME="parm-zoom"><dt><b>zoom=</b><em>name</em></a>
-<dd>Set current region settings to the smallest region
-encompassing all non-zero data in the named raster map
-layer that fall inside the user's current region.
+<h3>Parameters:</h3>
+<dl>
+<dt><b>zoom=</b><em>name</em>
+<dd>Shrink current region settings to the smallest region
+encompassing all non-NULL data in the named raster map
+layer that fall inside the user's current region. In this
+way you can tightly zoom in on isolated clumps within a
+bigger map.
<p>
-
If the user also includes the <b>rast=</b><em>name</em>
option on the command line, <b>zoom=</b><em>name</em> will
set the current region settings to the smallest region
-encompassing all non-zero data in the named <b>zoom</b> map
+encompassing all non-NULL data in the named <b>zoom</b> map
that fall inside the region stated in the cell header for
the named <b>raster</b> map.
@@ -326,12 +341,41 @@
map's edges. To perform the latter function, use the
<b>rast=</b><em>name</em> option.
+<!--
<dt><b>save=</b><em>name</em>
<dd>Save current region settings in the named region file
+-->
+
</dl>
--->
+<h2>NOTES</h2>
+
+After all updates have been applied, the current region's
+southern and western boundaries are (silently) adjusted so
+that the north/south distance is a multiple of the
+north/south resolution and that the east/west distance is a
+multiple of the east/west resolution.
+
+<p>
+With the <b>-a</b> flag all four boundaries are adjusted
+to be even multiples of the resolution.
+
+<p>
+The <b>-m</b> flag will report the region resolution in meters. The
+resolution is calculated by averaging the resolution at the region
+boundaries. This resolution is calculated by dividing the geodesic
+distance in meters at the boundary by the number of rows or columns.
+For example the east / west resolution (ewres) is determined from an
+average of the geodesic distances at the North and South boundaries
+divided by the number of columns.
+
+<p>
+The <b>-p</b> (or <b>-g</b>) option is recognized
+last. This means that all changes are applied to the
+region settings before printing occurs.
+
+
<h2>EXAMPLES</h2>
<dl>
@@ -349,13 +393,14 @@
g.region n=51:36:05N e=10:10:05E s=51:29:55N w=9:59:55E res=0:00:01
</pre></div>
-<dd> will reset the northing, easting, southing, westing and resolution for the current
-region, here in DMS latitude-longitude style (but also decimal degrees can be used).
+<dd> will reset the northing, easting, southing, westing and resolution
+for the current region, here in DMS latitude-longitude style
+(decimal degrees and degrees with decimal minutes can also be used).
<p>
<dt><div class="code"><pre>
-g.region -dp s=698000
+g.region -dp s=698000
</pre></div>
<dd> will set the current region from the default region
@@ -371,7 +416,6 @@
<dd> The n=<em>value</em> may also be specified as a
function of its current value: n=n+<em>value</em>
increases the current northing, while n=n-<em>value</em>
-
decreases it. This is also true for s=<em>value</em>,
e=<em>value</em>, and w=<em>value</em>. In this example
the current region's northern boundary is extended by 1000
@@ -392,13 +436,13 @@
larger than the western boundary's coordinate value. The
corresponding forms s=n-<em>value</em> and
-
<p>
w=e-<em>value</em> may be used to set the values of the
region's southern and western boundaries, relative to the
northern and eastern boundary values.
+
<dt><div class="code"><pre>
g.region rast=soils
</pre></div>
@@ -411,18 +455,18 @@
<dt><div class="code"><pre>
-g.region zoom=soils
+g.region rast=soils zoom=soils
</pre></div>
<dd> This form will first look up the cell header file for
the raster map layer <em>soils</em>, use this as the
current region setting, and then shrink the region down to
-the smallest region which still encompasses all non-NULL <!--? non-zero ? -->
-data in the map layer <em>soils</em>. <!-- Note that if the
-parameter <em>zoom=soils</em> were not specified, the
-zoom would move to encompass all non-zero data values in
-the soils map that were located within the current region
-setting. -->
+the smallest region which still encompasses all non-NULL
+data in the map layer <em>soils</em>. Note that if the
+parameter <em>rast=soils</em> were not specified, the
+zoom would shrink to encompass all non-NULL data values in
+the soils map that were located within the <i>current region</i>
+settings.
<p>
@@ -444,13 +488,14 @@
</pre></div>
<dd> This will zoom into the smallest region which
-encompasses all non-NULL <!-- non-zero? --> soils data values, and save the
+encompasses all non-NULL soils data values, and save the
new region settings in a file to be called <em>soils</em>
and stored under the <kbd>windows</kbd> directory in the
user's current mapset. The current region settings are not
changed.
<p>
+
<dt><div class="code"><pre>
g.region b=0 t=3000 tbres=200 res3=100
g.region -p3
@@ -587,7 +632,8 @@
g.region -pm
</pre></div>
-<dd> This will print the current region in the format (latitude-longitude location):
+<dd> This will print the current region in the format
+ (latitude-longitude location):
<div class="code"><pre>
projection: 3 (Latitude-Longitude)
@@ -606,14 +652,11 @@
</dl>
-The <b>-p</b> (or <b>-g</b>) option is recognized
-last. This means that all changes are applied to the
-region settings before printing occurs.
-
<p>
Usage example of <em>g.region</em> in a shell with external software:<br>
-Extract spatial subset of external vector map 'soils.shp' to new external vector
-map 'soils_cut.shp' using the OGR 'ogr2ogr' tool:<br>
+<!-- why not 'v.in.ogr spatial=' ?? -->
+Extract spatial subset of external vector map 'soils.shp' to new external
+vector map 'soils_cut.shp' using the OGR 'ogr2ogr' tool:<br>
<div class="code"><pre>
eval `g.region -g`
@@ -621,6 +664,8 @@
</pre></div>
This requires that the location/SHAPE file projection match.
+
+
<p>
Usage example of <em>g.proj</em> and <em>g.region</em> in a shell with external software:<br>
Extract spatial subset of external raster map 'p016r035_7t20020524_z17_nn30.tif'
@@ -637,38 +682,19 @@
Here the input raster map does not have to match the location
projection since it is reprojected on the fly.
-<h2>NOTE</h2>
-After all updates have been applied, the current region's
-southern and western boundaries are (silently) adjusted so
-that the north/south distance is a multiple of the
-north/south resolution and that the east/west distance is a
-multiple of the east/west resolution.
-<p>
+<h2>SEE ALSO</h2>
-With the <b>-a</b> flag all four boundaries are adjusted
-to be even multiples of the resolution.
+<em>
+<a HREF="d.zoom.html">d.zoom</a><br>
+<a HREF="g.access.html">g.access</a><br>
+<a HREF="g.mapsets.html">g.mapsets</a><br>
+<a HREF="g.proj.html">g.proj</a><BR>
+<a HREF="variables.html#internal">GRASS_REGION and WIND_OVERRIDE environment variables</a><BR>
+</em>
-<p>
-The <b>-m</b> flag will report the region resolution in meters. The
-resolution is calculated by averaging the resolution at the region
-boundaries. This resolution is calculated by dividing the geodesic
-distance in meters at the boundary by the number of rows or columns.
-For example the east / west resolution (ewres) is determined from an
-average of the geodesic distances at the North and South boundaries
-divided by the number of columns.
-
-
-
-<h2>SEE ALSO</h2>
-
-<em><a HREF="d.zoom.html">d.zoom</a></em><br>
-<em><a HREF="g.access.html">g.access</a></em><br>
-<em><a HREF="g.mapsets.html">g.mapsets</a></em><br>
-<em><a HREF="g.projinfo.html">g.projinfo</a></em>
-
<h2>AUTHOR</h2>
Michael Shapiro,
More information about the grass-commit
mailing list