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

NAME

6       d.profile  - Interactive profile plotting utility with optional output.
7

KEYWORDS

9       display
10

SYNOPSIS

12       d.profile
13       d.profile help
14       d.profile rast=string  [drast=string]   [plotfile=string]   [--verbose]
15       [--quiet]
16
17   Parameters:
18       rast=string
19           Raster map to be profiled
20
21       drast=string
22           Optional display raster
23
24       plotfile=string
25           Output profile data to file(s) with prefix 'name'
26

DESCRIPTION

28       This command works only interactively. It clears  the  entire  graphics
29       screen  and  provides a graphical interaction allowing the selection of
30       transects for which profiles are then generated. Input  parameters  can
31       be specified on the command line for quicker start-up.
32

USER PROMPTS

34       First,  you  will  be  presented  with  a prompt asking you to choose a
35       raster map layer to be profiled. Then  you  will  be  prompted  for  an
36       optional  display  raster.   The  optional display raster will be shown
37       rather than the profiled raster.  This is useful to  be  able  to  more
38       easily see ground features, such as might be visible in an aerial photo
39       or satellite image. Finally, you will be prompted for the  name  prefix
40       for  output  file(s)  containing  the profile data. This is an optional
41       feature.
42
43       After parameters are given, the raster layer will be displayed  in  the
44       left  half  of the graphics monitor, and the right half will be divided
45       into four frames. There will also be two frames along the  top  of  the
46       monitor:  a  mouse-button menu frame on the left, and a status frame on
47       the right.
48
49       The mouse-button menu initially offers you three  options:  Mouse  But‐
50       tons:
51       Left: Where am I?
52       Middle: Mark FIRST Point of Profile Line.
53       Right: QUIT this.
54
55       You  may query the displayed raster map layer by indicating points with
56       the left mouse-button. The coordinates and category value of each point
57       that  you  indicate  will  be displayed on in the status frame.  If you
58       mark the first point of the profile line you will be presented with the
59       following mouse-button menu: Mouse Buttons:
60       Left: Where am I?
61       Middle: Mark SECOND Point of Profile Line.
62       Right: QUIT this.
63
64       Once  you  mark  the second point of the profile line, the profile line
65       will be labeled (with a letter from A to D) and displayed in one of the
66       four display frames on the right hand side of the screen. You will then
67       be presented with a third mouse-button menu: Mouse Buttons:
68       Left: DO ANOTHER
69       Middle: CLEAR DISPLAY
70       Right: QUIT this.
71
72       If you would like to view another profile, click on the left mouse-but‐
73       ton.  If you would like to redisplay the raster map layer and clear out
74       the four profile frames, click on the middle mouse-button. If you would
75       like to quit, then click on the right button.
76
77       If  you  selected  the  plotfile option, you will have up to four files
78       starting with the name and followed by a suffix of the plot  letter  A,
79       B, C, or D.  The plots that are written to these files reflect the last
80       of each plot done with that letter (i.e. They will match what's in  the
81       display when you quit).
82
83       The  format of the plot files is not geared toward any particular soft‐
84       ware, but should be easy to coax into a number of other programs.   The
85       first  three lines contain some header information about the plot, each
86       prefixed with a # sign to denote a  comment.   A  fourth  comment  line
87       describes  the  data that follows.  It consists of the distance (always
88       in meters), the cell value (in whatever units it is in), the easting in
89       decimal format, and the northing in decimal format.  The number of val‐
90       ues will vary depending on the length of the profile,  cell  resolution
91       and  the  slope  angle  of  the profile line.  Below is an example of a
92       plotfile:
93
94       # Profile A of elev.ft@snows
95       #  From  (702879.29679757,   4287317.55920185)   to   (702722.40973589,
96       4287061.72632285)
97       # Stats: Count = 644, Min = 2424.658936, Max = 2513.246094
98       # dist value east north
99       0.000000 2513.246094 702879.102364 4287317.516912
100       0.000000 2513.246094 702878.713496 4287317.118970
101       0.556395 2513.246094 702878.324629 4287316.721029
102       1.112790 2513.246094 702878.324629 4287316.323088
103

NOTES

105       You  might  notice  the  first  two 'dist' values in the profile output
106       above are both zero.  This is due to the fact the cell  resolution  for
107       this  file  is less than one meter, and so the function that calculates
108       the distance considers the distance between the first cell and the sec‐
109       ond  to  be  zero.  You might also notice, the coordinates given in the
110       header and displayed on screen are slightly different  from  the  first
111       and last coordinates given in the profile data output.  This is because
112       the profile data output finds the eastings and northings for the center
113       of  the  cells  while  the coordinate transformations from mouse clicks
114       might yield slightly different coordinates which still fall within  the
115       same  cell  boundaries.   The difference should always be less than the
116       distance between the center and any corner (not edge!) of the  cell  at
117       the resolution of the profiled raster.
118
119       Only  four  output  plotfiles  can be made.  Each time a new profile is
120       run, the plotfile is immediately written to the file name.letter.   One
121       can  take advantage of this fact to create an unlimited number of plot‐
122       files simply by renaming the output files before running more profiles.
123       This may not always be the case, but it is at the time of this writing.
124
125       Useful  enhancements  to  d.profile  would include: Adding an option to
126       display profiles using category colors,  like  a  bar-chart.   Allowing
127       profile  lines  to  be  defined  by  a  series of points, not just two.
128       Allowing profiles to be saved in a file, for later  viewing  by  GRASS.
129       Allowing the user to enter profile line points by typing coordinates.
130
131   Perl Script to convert output to a site_list
132       The script below will convert the plotfile output to the site_list for‐
133       mat.  It probably won't work 100% for lat/lon datasets.
134
135       #! /usr/bin/perl -w
136       # prof2sites.pl: converts the output of d.profile to a site_list
137
138       my ($dist, $elev, $east, $north);
139
140       while ()
141       {
142       if (m/^#/)
143       {
144       print "$_";
145       }
146       else
147       {
148       chomp;
149       ($dist, $elev, $east, $north) = split / /;
150       print "$east|$north|$elev|#1 \%$dist \@Profile\n";
151       }
152       }
153

BUGS

155       None known.
156

AUTHOR

158       Dave Johnson
159        DBA Systems, Inc.  10560 Arrowhead Drive
160       Fairfax, Virginia 22030
161
162       Modified by Eric G. Miller for  profile  output,  support  of  floating
163       point rasters, and optional display raster (02-Dec-2000).
164
165       Last changed: $Date: 2003-04-11 17:25:34 +0200 (Fri, 11 Apr 2003) $
166
167       Full index
168
169       © 2003-2008 GRASS Development Team
170
171
172
173GRASS 6.3.0                                                       d.profile(1)
Impressum