1r.profile(1)                  Grass User's Manual                 r.profile(1)
2
3
4

NAME

6       r.profile   - Outputs the raster map layer values lying on user-defined
7       line(s).
8

KEYWORDS

10       raster
11

SYNOPSIS

13       r.profile
14       r.profile help
15       r.profile     [-igc]      input=name       [output=string]        [pro‐
16       file=east,north[,east,north,...]]   [res=float]   [null=string]
17
18   Flags:
19       -i  Interactively select End-Points
20
21       -g  Output  easting  and  northing  in first two columns of four column
22           output
23
24       -c  Output RRR:GGG:BBB color values for each profile point
25
26   Parameters:
27       input=name
28           Name of input raster map
29
30       output=string
31           Name of file for output (use output=- for stdout) Default: -
32
33       profile=east,north[,east,north,...]
34           Profile Coordinate Pairs
35
36       res=float
37           Resolution along profile (default = current region resolution)
38
39       null=string
40           Character to represent no data cell Default: *
41

DESCRIPTION

43       This program outputs two or four column (with -g) data to stdout or  an
44       ASCII  file.  The default two column output consists of cumulative pro‐
45       file length (in meters) and raster value. The optional four column out‐
46       put  consists  of  easting, northing, cumlative profile length (m), and
47       raster value. Profile end or "turning" points can be set manually  with
48       the  profile  argument or selected interactively from the GRASS monitor
49       by setting the -i flag. The profile  resolution,  or  distance  between
50       profile  points, is obtained from the current region resolution, or can
51       be manually set with the res argument.
52
53       The -i flag allows the user for selecting the profile  from  the  GRASS
54       monitor  by  clicking the left mouse button along the profile; clicking
55       the right mouse button ends the profile.
56
57       The profile parameter can be set to comma separated geographic  coordi‐
58       nates  for  profile line endpoints. The interactive flag (-i) overrides
59       this option.
60
61       The res parameter sets the distance between each profile point (resolu‐
62       tion).  The  resolution  must be provided in GRASS database units (i.e.
63       decimal degrees for Lat Long databases and meters for UTM). By  default
64       r.profile uses the resolution of the current GRASS region.
65
66       The null parameter can optionally be set to change the character string
67       representing null values.
68

OUTPUT FORMAT

70       The multi column output from r.profile is  intended  for  easy  use  in
71       other  programs.   The output can be piped (|) directly into other pro‐
72       grams or saved to a file for later use. Output with geographic  coordi‐
73       nates  (-g) is compatible with v.in.ascii and can be piped direcly into
74       this program.
75             r.profile -ig input=elev.rast  |  v.in.ascii  output=elev.profile
76       fs=space
77        The 2 column output is compatible with most plotting programs.
78
79       The  optional RGB output provides the associated GRASS colour value for
80       each profile point.
81

EXAMPLES

83       Example 1
84       Extract a profile with coordinates provided on the command line:
85       r.profile        input=elev.rast        output=profile.pts         pro‐
86       file=562517,7779433,562984,7779533,563875,7779800
87        This will extract a profile along the track defined by the three coor‐
88       dinate pairs.
89
90       Example 2
91       Extract a profile by interactively selecting the profile route from the
92       GRASS monitor:
93       r.profile -i input=elev.rast output=profile.pts
94         Use  the  left  mouse button to select the profile route in the GRASS
95       monitor. Use the right mouse button to end the profile.
96
97       Example 3
98       Extract a profile with coordinates provided from standard input  or  an
99       external file:
100
101       First create a points file with d.where
102       d.where > saved.points
103        Then pipe the points file into r.profile
104       cat saved.points | r.profile input=elev.rast output=profile.pts
105         The  advantage  of this method is that the same profile points can be
106       piped into different GRASS rasters by changing the input parameter.
107
108       With this method the coordinates must be given as space or  tab  seper‐
109       ated easting and northing. Labels after these values are ignored.
110

NOTES

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
114       an  exact  multiple  of  the  profile resolution and will therefore not
115       always match the end point coordinates entered for the segmanet.
116
117       To extract the numbers in scripts, following parameters can be used:
118             r.profile input=dgm12.5 profile=3570631,5763556 2>/dev/null
119        This filters out the everything except the numbers.
120

SEE ALSO

122       v.in.ascii, d.where, d.profile, r.what, r.transect
123

AUTHOR

125       Bob Covill
126
127       Last changed: $Date: 2005/09/16 14:58:12 $
128
129       Full index
130
131
132
133GRASS 6.2.2                                                       r.profile(1)
Impressum