~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to raster/r.profile/r.profile.html

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<h2>DESCRIPTION</h2>
 
2
 
 
3
This program outputs two or four column (with <b>-g</b>) data to stdout or 
 
4
an ASCII file. The default two column output consists of cumulative profile 
 
5
length and raster value. The optional four column output consists 
 
6
of easting, northing, cumulative profile length, and raster value. Profile
 
7
end or "turning" points can be set manually with the <b>coordinates</b>
 
8
argument. The profile resolution, or distance between profile
 
9
points, is obtained from the current region resolution, or can be manually
 
10
set with the <b>resolution</b> argument.
 
11
 
 
12
<p>
 
13
The <b>coordinates</b> parameter can be set to comma separated geographic
 
14
coordinates for profile line endpoints.
 
15
Alternatively the coordinate pairs can be piped from the text file specified
 
16
by <b>file</b> option, or if set to "-", from <tt>stdin</tt>.
 
17
In these cases the coordinate pairs should be given one comma separated pair
 
18
per line.
 
19
 
 
20
<p>
 
21
The <b>resolution</b> parameter sets the distance between each profile point
 
22
(resolution). The resolution must be provided in GRASS database units (i.e.
 
23
decimal degrees for Lat Long databases and meters for UTM). By default
 
24
<em>r.profile</em> uses the resolution of the current GRASS region.
 
25
 
 
26
<p>
 
27
The <b>null</b> parameter can optionally be set to change the character
 
28
string representing null values.
 
29
 
 
30
 
 
31
<h2>OUTPUT FORMAT</h2>
 
32
 
 
33
The multi column output from <em>r.profile</em> is intended for easy use in
 
34
other programs.  The output can be piped (|) directly into other programs or
 
35
saved to a file for later use. Output with geographic coordinates (<em>-g</em>)
 
36
is compatible with <em><a href="v.in.ascii.html">v.in.ascii</a></em> and can 
 
37
be piped direcly into this program.
 
38
 
 
39
<div class="code"><pre>
 
40
r.profile -g input=elevation coordinates=... | v.in.ascii output=elevation_profile separator=space
 
41
</pre></div>
 
42
 
 
43
The 2 column output is compatible with most plotting programs.
 
44
<p>
 
45
The optional RGB output provides the associated GRASS colour value for
 
46
each profile point.
 
47
 
 
48
<p>Option <b>units</b> enables to set units of the profile length output.
 
49
If the units are not specified, current location units will be used.
 
50
In case of geographic locations (latitude/longitude), meters are used as default unit.
 
51
 
 
52
<h2>EXAMPLES</h2>
 
53
 
 
54
<b>Example 1</b><br>
 
55
Extract a profile with coordinates provided on the command line:
 
56
 
 
57
<div class="code"><pre>
 
58
r.profile input=elevation output=profile_points coordinates=562517,7779433,562984,7779533,563875,7779800
 
59
</pre></div>
 
60
This will extract a profile along the track defined by the three coordinate
 
61
pairs.
 
62
<p><br>
 
63
 
 
64
 
 
65
<!-- d.where no longer there
 
66
<b>Example 2</b><br>
 
67
Extract a profile with coordinates provided from standard input or an external file:
 
68
<p>First create a points file with <em><a href="d.where.html">d.where</a></em>
 
69
 
 
70
<div class="code"><pre>
 
71
d.where > saved.points
 
72
</pre></div>
 
73
 
 
74
Then pipe the points file into r.profile
 
75
 
 
76
<div class="code"><pre>
 
77
cat saved.points | r.profile input=elev.rast output=profile.pts file=-
 
78
</pre></div>
 
79
 
 
80
The advantage of this method is that the same profile points can be piped
 
81
into different GRASS rasters by changing the input parameter.
 
82
<p>
 
83
With this method the coordinates must be given as space or tab separated
 
84
easting and northing. Labels after these values are ignored.
 
85
<p>
 
86
Another example using d.where:
 
87
 
 
88
<div class="code"><pre>
 
89
d.where | r.profile elevation.dem
 
90
</pre></div>
 
91
<p><br>
 
92
-->
 
93
 
 
94
<b>Example 2</b><br>
 
95
Pipe coordinates into r.profile
 
96
<div class="code"><pre>
 
97
r.profile elevation.dem res=1000 file=- &lt;&lt; EOF
 
98
 591243,4926344
 
99
 592509,4922156
 
100
 594100,4920793
 
101
 599910,4919365
 
102
 602929,4919235
 
103
 604844,4918391
 
104
 606468,4917190
 
105
 607766,4915664
 
106
EOF
 
107
</pre></div>
 
108
 
 
109
 
 
110
<h2>NOTES</h2>
 
111
 
 
112
The profile resolution is measured exactly from the supplied end or
 
113
"turning" point along the profile. The end of a profile segment will be an
 
114
exact multiple of the profile resolution and will therefore not always match
 
115
the end point coordinates entered for the segmanet.
 
116
 
 
117
<p>To extract the numbers in scripts, following parameters can be used:
 
118
<div class="code"><pre>
 
119
r.profile input=dgm12.5 coordinates=3570631,5763556 2>/dev/null
 
120
</pre></div>
 
121
 
 
122
This filters out the everything except the numbers.
 
123
 
 
124
 
 
125
<h2>SEE ALSO</h2>
 
126
 
 
127
<em>
 
128
<a href="v.in.ascii.html">v.in.ascii</a>,
 
129
<a href="r.what.html">r.what</a>,
 
130
<a href="r.transect.html">r.transect</a>,
 
131
<a href="wxGUI.html">wxGUI profile tool</a>
 
132
</em>
 
133
 
 
134
 
 
135
<h2>AUTHOR</h2>
 
136
<a href="mailto:bcovill@tekmap.ns.ca">Bob Covill</a>
 
137
 
 
138
<p>
 
139
<i>Last changed: $Date: 2014-10-04 21:14:57 +0200 (Sat, 04 Oct 2014) $</i>