[GRASS-SVN] r59054 - grass/trunk/raster/r.profile
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 14 17:17:02 PST 2014
Author: hamish
Date: 2014-02-14 17:17:01 -0800 (Fri, 14 Feb 2014)
New Revision: 59054
Modified:
grass/trunk/raster/r.profile/main.c
grass/trunk/raster/r.profile/r.profile.html
Log:
rename options: profile -> coordinates, coord_file -> file, res -> resolution
Modified: grass/trunk/raster/r.profile/main.c
===================================================================
--- grass/trunk/raster/r.profile/main.c 2014-02-15 01:08:05 UTC (rev 59053)
+++ grass/trunk/raster/r.profile/main.c 2014-02-15 01:17:01 UTC (rev 59054)
@@ -61,22 +61,21 @@
_("Name of file for output (use output=- for stdout)");
parm.profile = G_define_standard_option(G_OPT_M_COORDS);
- parm.profile->key = "profile";
parm.profile->required = NO;
parm.profile->multiple = YES;
- parm.profile->key_desc = "east,north";
parm.profile->description = _("Profile coordinate pairs");
parm.coord_file = G_define_standard_option(G_OPT_F_INPUT);
- parm.coord_file->key = "coordinate_file";
+ parm.coord_file->key = "file";
+ parm.coord_file->required = NO;
parm.coord_file->label =
_("Name of input file containing coordinate pairs");
parm.coord_file->description =
- _("Use instead of the 'profile' option. \"-\" reads from stdin.");
- parm.coord_file->required = NO;
+ _("Use instead of the 'coordinates' option. "
+ "\"-\" reads from stdin.");
parm.res = G_define_option();
- parm.res->key = "res";
+ parm.res->key = "resolution";
parm.res->type = TYPE_DOUBLE;
parm.res->required = NO;
parm.res->description =
Modified: grass/trunk/raster/r.profile/r.profile.html
===================================================================
--- grass/trunk/raster/r.profile/r.profile.html 2014-02-15 01:08:05 UTC (rev 59053)
+++ grass/trunk/raster/r.profile/r.profile.html 2014-02-15 01:17:01 UTC (rev 59054)
@@ -4,24 +4,27 @@
an ASCII file. The default two column output consists of cumulative profile
length (in meters) and raster value. The optional four column output consists
of easting, northing, cumlative profile length (m), and raster value. Profile
-end or "turning" points can be set manually with the <b>profile</b>
+end or "turning" points can be set manually with the <b>coordinates</b>
argument. The profile resolution, or distance between profile
points, is obtained from the current region resolution, or can be manually
-set with the <b>res</b> argument.
+set with the <b>resolution</b> argument.
-<p>The <b>profile</b> parameter can be set to comma separated geographic
+<p>
+The <b>coordinates</b> parameter can be set to comma separated geographic
coordinates for profile line endpoints.
Alternatively the coordinate pairs can be piped from the text file specified
-by <b>coordinate_file</b> option, or if set to "-", from <tt>stdin</tt>.
+by <b>file</b> option, or if set to "-", from <tt>stdin</tt>.
In these cases the coordinate pairs should be given one comma separated pair
per line.
-<p>The <b>res</b> parameter sets the distance between each profile point
+<p>
+The <b>resolution</b> parameter sets the distance between each profile point
(resolution). The resolution must be provided in GRASS database units (i.e.
decimal degrees for Lat Long databases and meters for UTM). By default
<em>r.profile</em> uses the resolution of the current GRASS region.
-<p>The <b>null</b> parameter can optionally be set to change the character
+<p>
+The <b>null</b> parameter can optionally be set to change the character
string representing null values.
@@ -34,11 +37,12 @@
be piped direcly into this program.
<div class="code"><pre>
-r.profile -g input=elevation profile=... | v.in.ascii output=elevation_profile separator=space
+r.profile -g input=elevation coordinates=... | v.in.ascii output=elevation_profile separator=space
</pre></div>
The 2 column output is compatible with most plotting programs.
-<p>The optional RGB output provides the associated GRASS colour value for
+<p>
+The optional RGB output provides the associated GRASS colour value for
each profile point.
@@ -48,7 +52,7 @@
Extract a profile with coordinates provided on the command line:
<div class="code"><pre>
-r.profile input=elevation output=profile_points profile=562517,7779433,562984,7779533,563875,7779800
+r.profile input=elevation output=profile_points coordinates=562517,7779433,562984,7779533,563875,7779800
</pre></div>
This will extract a profile along the track defined by the three coordinate
pairs.
@@ -67,14 +71,16 @@
Then pipe the points file into r.profile
<div class="code"><pre>
-cat saved.points | r.profile input=elev.rast output=profile.pts
+cat saved.points | r.profile input=elev.rast output=profile.pts file=-
</pre></div>
-The advantage of this method is that the same profile points can be piped into
-different GRASS rasters by changing the input parameter.
-<p>With this method the coordinates must be given as space or tab separated easting
-and northing. Labels after these values are ignored.
-<p>Another example using d.where:
+The advantage of this method is that the same profile points can be piped
+into different GRASS rasters by changing the input parameter.
+<p>
+With this method the coordinates must be given as space or tab separated
+easting and northing. Labels after these values are ignored.
+<p>
+Another example using d.where:
<div class="code"><pre>
d.where | r.profile elevation.dem
@@ -85,7 +91,7 @@
<b>Example 2</b><br>
Pipe coordinates into r.profile
<div class="code"><pre>
-r.profile elevation.dem res=1000 coordinate_file=- << EOF
+r.profile elevation.dem res=1000 file=- << EOF
591243,4926344
592509,4922156
594100,4920793
@@ -107,7 +113,7 @@
<p>To extract the numbers in scripts, following parameters can be used:
<div class="code"><pre>
-r.profile input=dgm12.5 profile=3570631,5763556 2>/dev/null
+r.profile input=dgm12.5 coordinates=3570631,5763556 2>/dev/null
</pre></div>
This filters out the everything except the numbers.
More information about the grass-commit
mailing list