| 1 | <h2>DESCRIPTION</h2>
|
|---|
| 2 |
|
|---|
| 3 | <em>r.contour</em> produces a vector map of specified contours from input raster map.
|
|---|
| 4 |
|
|---|
| 5 | Contours can be produced using a comma-separated list of values
|
|---|
| 6 | in <b>levels</b>, or at some regular increment using the <b>step</b>
|
|---|
| 7 | parameter, using <b>minlevel</b> and <b>maxlevel</b> as minimum and
|
|---|
| 8 | maximum contour values, respectively. If no <b>minlevel</b>
|
|---|
| 9 | or <b>maxlevel</b> is specified, the minimum and maximum cell values
|
|---|
| 10 | in the <b>input</b> raster map will be used.
|
|---|
| 11 |
|
|---|
| 12 | <h2>NOTES</h2>
|
|---|
| 13 |
|
|---|
| 14 | <em>r.contour</em> will either step through incremental contours or produce
|
|---|
| 15 | contours from a list of levels, not both. If both a list of levels and
|
|---|
| 16 | a step are specified, the list will be produced and the step will be ignored.
|
|---|
| 17 |
|
|---|
| 18 | <p>Zero is treated as a valid data value by <em>r.contour</em>.
|
|---|
| 19 |
|
|---|
| 20 | <p>If a contour level exactly matches a category value in the raster map,
|
|---|
| 21 | the contour line may backtrack on itself, causing illegal arcs to be produced
|
|---|
| 22 | in the output vector map.
|
|---|
| 23 |
|
|---|
| 24 | <p>The optional <b>cut</b> parameter allows the user to specify a minimum number of
|
|---|
| 25 | raster cells eligilble to be included in a contour line written to the <b>output</b>
|
|---|
| 26 | vector map. It acts like a filter, omitting spurs, single points, etc., making the output more generalized.
|
|---|
| 27 |
|
|---|
| 28 | <h2>EXAMPLES</h2>
|
|---|
| 29 |
|
|---|
| 30 | In the Spearfish location, produce a vector contour map from input raster <i>elevation.dem</i>
|
|---|
| 31 | with contour levels from 1000m to 2000m, 100m contour step, and a minimum of 200 input raster
|
|---|
| 32 | points contributing to the contour line:
|
|---|
| 33 |
|
|---|
| 34 | <div class="code"><pre>
|
|---|
| 35 | r.contour input=elevation.dem output=elevation_dem_contours \
|
|---|
| 36 | minlevel=1000 maxlevel=2000 step=100 cut=200
|
|---|
| 37 | </pre></div>
|
|---|
| 38 |
|
|---|
| 39 | <p>
|
|---|
| 40 | For an example of using levels with <em>r.contour</em> this example uses
|
|---|
| 41 | the elevation map from the North Carolina database:
|
|---|
| 42 |
|
|---|
| 43 | <div class="code"><pre>
|
|---|
| 44 | g.region raster=elevation
|
|---|
| 45 | r.contour in=elevation out=contours levels=60,90,120,150 --o
|
|---|
| 46 | d.mon wx0
|
|---|
| 47 | d.rast elevation_shade
|
|---|
| 48 | d.vect contours color=red
|
|---|
| 49 | </pre></div>
|
|---|
| 50 |
|
|---|
| 51 | <div align="center" style="margin: 10px">
|
|---|
| 52 | <a href="r_contour_using_levels.png">
|
|---|
| 53 | <img src="r_contour_using_levels.png" width="600" alt="r.contours example" border=0><br>
|
|---|
| 54 | </a>
|
|---|
| 55 | <i>Contour lines shown on shaded terrain map</i>
|
|---|
| 56 | </div>
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 | <p>
|
|---|
| 60 | For an example of using steps with <em>r.contour</em> this example uses
|
|---|
| 61 | the LiDAR data derived elevation map from the North Carolina database:
|
|---|
| 62 |
|
|---|
| 63 | <div class="code"><pre>
|
|---|
| 64 | g.region raster=elev_lid792_1m -p
|
|---|
| 65 | r.contour input=elev_lid792_1m output=elev_lid792_1m_contours \
|
|---|
| 66 | minlevel=100 maxlevel=150 step=10
|
|---|
| 67 | </pre></div>
|
|---|
| 68 |
|
|---|
| 69 | <h2>AUTHORS</h2>
|
|---|
| 70 |
|
|---|
| 71 | Terry Baker, U.S. Army Construction Engineering Research Laboratory<br>
|
|---|
| 72 | 3/2001: cut parameter and fixes by Andrea Aime (aaime@libero.it)
|
|---|
| 73 |
|
|---|
| 74 | <p>
|
|---|
| 75 | <i>Last changed: $Date: 2016-12-09 18:14:52 +0000 (Fri, 09 Dec 2016) $</i>
|
|---|
| 76 |
|
|---|