123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <h2>DESCRIPTION</h2>
- This program outputs two or four column (with <b>-g</b>) data to stdout or
- 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>
- argument or selected interactively from the GRASS monitor by setting the
- <b>-i</b> flag. 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.
- <p>The <b>-i</b> flag allows the user for selecting the profile from the GRASS
- monitor by clicking the left mouse button along the profile; clicking the
- right mouse button ends the profile.
- <p>The <b>profile</b> parameter can be set to comma separated geographic
- coordinates for profile line endpoints. The interactive flag (<b>-i</b>)
- overrides this option. Alternatively the coordinate pairs can be piped
- from stdin, one comma separated pair per line.
- <p>The <b>res</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
- string representing null values.
- <h2>OUTPUT FORMAT</h2>
- The multi column output from <em>r.profile</em> is intended for easy use in
- other programs. The output can be piped (|) directly into other programs or
- saved to a file for later use. Output with geographic coordinates (<em>-g</em>)
- is compatible with <em><a href="v.in.ascii.html">v.in.ascii</a></em> and can
- be piped direcly into this program.
- <div class="code"><pre>
- r.profile -ig input=elev.rast | v.in.ascii output=elev.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
- each profile point.
- <h2>EXAMPLES</h2>
- <b>Example 1</b><br>
- Extract a profile with coordinates provided on the command line:
- <div class="code"><pre>
- r.profile input=elev.rast output=profile.pts profile=562517,7779433,562984,7779533,563875,7779800
- </pre></div>
- This will extract a profile along the track defined by the three coordinate
- pairs.
- <p><br>
- <b>Example 2</b><br>
- Extract a profile by interactively selecting the profile route from the GRASS
- monitor:
- <div class="code"><pre>
- r.profile -i input=elev.rast output=profile.pts
- </pre></div>
- Use the left mouse button to select the profile route in the GRASS monitor. Use the
- right mouse button to end the profile.
- <p><br>
- <b>Example 3</b><br>
- Extract a profile with coordinates provided from standard input or an external file:
- <p>First create a points file with <em><a href="d.where.html">d.where</a></em>
- <div class="code"><pre>
- d.where > saved.points
- </pre></div>
- Then pipe the points file into r.profile
- <div class="code"><pre>
- cat saved.points | r.profile input=elev.rast output=profile.pts
- </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:
- <div class="code"><pre>
- d.where | r.profile elevation.dem
- </pre></div>
- <p><br>
- <b>Example 4</b><br>
- Pipe coordinates into r.profile
- <div class="code"><pre>
- r.profile elevation.dem res=1000 << EOF
- 591243,4926344
- 592509,4922156
- 594100,4920793
- 599910,4919365
- 602929,4919235
- 604844,4918391
- 606468,4917190
- 607766,4915664
- EOF
- </pre></div>
- <h2>NOTES</h2>
- The profile resolution is measured exactly from the supplied end or
- "turning" point along the profile. The end of a profile segment will be an
- exact multiple of the profile resolution and will therefore not always match
- the end point coordinates entered for the segmanet.
- <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
- </pre></div>
- This filters out the everything except the numbers.
- <h2>SEE ALSO</h2>
- <em>
- <a href="v.in.ascii.html">v.in.ascii</a>,
- <a href="d.where.html">d.where</a>,
- <a href="d.profile.html">d.profile</a>,
- <a href="r.what.html">r.what</a>,
- <a href="r.transect.html">r.transect</a>,
- <a href="wxGUI.html">wxGUI profile tool</a>
- </em>
- <h2>AUTHOR</h2>
- <a href="mailto:bcovill@tekmap.ns.ca">Bob Covill</a>
- <p><i>Last changed: $Date$</i>
|