[GRASS-SVN] r61040 - grass/branches/releasebranch_7_0/general/g.mlist
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jun 28 16:01:22 PDT 2014
Author: hcho
Date: 2014-06-28 16:01:22 -0700 (Sat, 28 Jun 2014)
New Revision: 61040
Modified:
grass/branches/releasebranch_7_0/general/g.mlist/g.mlist.html
Log:
g.mlist: backport from trunk
Modified: grass/branches/releasebranch_7_0/general/g.mlist/g.mlist.html
===================================================================
--- grass/branches/releasebranch_7_0/general/g.mlist/g.mlist.html 2014-06-28 23:00:29 UTC (rev 61039)
+++ grass/branches/releasebranch_7_0/general/g.mlist/g.mlist.html 2014-06-28 23:01:22 UTC (rev 61040)
@@ -1,12 +1,12 @@
<h2>DESCRIPTION</h2>
<em>g.mlist</em> searches for data files matching a pattern given by
-wildcards or POSIX Extended Regular Expressions. It is is an extended
+wildcards or POSIX Extended Regular Expressions. It is an extended
version of <em><a href="g.list.html">g.list</a></em>.
<p>
-See also the <em>g.list</em> help page for discussion of some module
-options.
+See also the <em><a href="g.list.html">g.list</a></em> help page for
+discussion of some module options.
<h2>NOTES</h2>
@@ -26,19 +26,74 @@
g.mlist type=rast,vect
</pre></div>
-<h3>Wildcards:</h3>
+<h3>Mapset search path</h3>
+If <b>mapset</b> is not specified than <em>g.mlist</em> searches for
+data files in the mapsets which are included in the search path
+(defined by <em><a href="g.mapsets.html">g.mapsets</a></em>),
+see <tt>g.mapsets -p</tt>.
+
+<div class="code"><pre>
+g.mlist rast
+
+raster map(s) available in mapset <user1>:
+dmt
+...
+raster map(s) available in mapset <PERMANENT>:
+aspect
+...
+</pre></div>
+
+By option <b>mapset</b>=. (one dot) can be listed only data files from
+the current mapset:
+
+<div class="code"><pre>
+g.mlist rast mapset=.
+raster map(s) available in mapset <user1>:
+dmt
+</pre></div>
+
+Similarly <b>mapset</b>=* (one asterisk) prints data files from all
+available mapsets also including those which are not listed in the
+current search path (see <tt>g.mapsets -l</tt>).
+
+<div class="code"><pre>
+g.mlist rast mapset=*
+
+raster map(s) available in mapset <landsat>:
+lsat5_1987_10
+...
+raster map(s) available in mapset <user1>:
+dmt
+...
+raster map(s) available in mapset <PERMANENT>:
+aspect
+...
+</pre></div>
+
+<h3>Wildcards</h3>
+
List all vector maps starting with letter "r":
<div class="code"><pre>
g.mlist type=vect pattern="r*"
</pre></div>
+List all vector maps starting with letter "r" or "a":
+<div class="code"><pre>
+g.mlist type=vect pattern="[ra]*"
+</pre></div>
+
+List all raster maps starting with "soil_" or "landuse_":
+<div class="code"><pre>
+g.mlist type=rast pattern="{soil,landuse}_*"
+</pre></div>
+
List certain raster maps with one variable character/number:
<div class="code"><pre>
g.mlist type=rast pattern="N45E00?.meters"
</pre></div>
-Use of <em>exclude</em> parameter:
+Use of <b>exclude</b> parameter:
<div class="code"><pre>
# without exclude:
g.mlist rast pat="r*" mapset=PERMANENT
@@ -59,36 +114,62 @@
rushmore
</pre></div>
-<h3>Regular expressions:</h3>
+<h3>Regular expressions</h3>
-List all soil maps starting with "soils" in their name:
+List all soil maps starting with "soils" in their name:
<div class="code"><pre>
g.mlist -r type=rast pattern='^soils'
</pre></div>
-List "tmp" if "tmp" raster map exists:
+List "tmp" if "tmp" raster map exists:
<div class="code"><pre>
-g.mlist -r pattern='^tmp$'
+g.mlist -r type=rast pattern='^tmp$'
</pre></div>
-List "tmp0" ..."tmp9" if corresponding vector map exists (each map name linewise):
+List "tmp0" ..."tmp9" if corresponding vector map exists
+(each map name linewise):
<div class="code"><pre>
g.mlist -r type=vect pattern='^tmp[0-9]$'
</pre></div>
-List "tmp0" ..."tmp9" if corresponding vector map exists (each map name comma separated):
+List "tmp0"..."tmp9" if corresponding vector map exists
+(each map name comma separated):
<div class="code"><pre>
g.mlist -r type=vect separator=comma pattern='^tmp[0-9]$'
</pre></div>
+<h3>Extended regular expressions</h3>
-<h3>Extended regular expressions:</h3>
-
List all precipitation maps for the years 1997-2012, comma separated:
<div class="code"><pre>
g.mlist -e type=rast separator=comma pattern="precip_total.(199[7-9]|200[0-9]|201[0-2]).sum"
</pre></div>
+<h3>Maps whose region overlaps with a saved region</h3>
+
+List all raster maps starting with "tmp_" whose region overlaps with
+the region of "test" raster map:
+<div class="code"><pre>
+g.region rast=test save=test_region
+g.mlist type=rast pattern='tmp_*' region=test_region
+</pre></div>
+
+List "tmp0"..."tmp9" vector maps whose region overlaps with
+the current region:
+<div class="code"><pre>
+g.mlist -r type=vect pattern='^tmp[0-9]$' region=.
+</pre></div>
+
+List all raster and vector maps whose region overlaps with the default region
+of the PERMANENT mapset in the current location (DEFAULT_WIND):
+<div class="code"><pre>
+g.mlist type=rast,vect region=*
+</pre></div>
+
+Note that, without <tt>region=*</tt>, <tt>g.mlist type=rast,vect</tt> simply
+lists all available raster and vector maps from the current search path
+regardless of their region.
+
<h2>SEE ALSO</h2>
<em>
@@ -102,7 +183,6 @@
<a href="http://en.wikipedia.org/wiki/Regular_expression">Regular expressions</a>
(aka regex) - from Wikipedia, the free encyclopedia
-
<h2>AUTHOR</h2>
Huidae Cho<br>
More information about the grass-commit
mailing list