NAME

d.profile - Displays profiles of a user-specified raster map layer.
(GRASS Display Program)

SYNOPSIS

d.profile
d.profile map=name [plotfile=name]

DESCRIPTION

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

USER PROMPTS

First, you will be presented with a prompt asking you to choose a raster map layer to be profiled. Next, you will be prompted for the name out an output file for your profiles. This is an optional feature. Once you specify a valid raster map layer name, the map layer will be displayed in the left half of the graphics display, and the right half of the dispay will be divided into four display frames. There will also be two frames along the top of the display: a mouse-button menu frame on the left, and a status frame on the right.

The mouse-button menu initially offers you three options:

Mouse Buttons:
Left: Where am I?
Middle: Mark FIRST Point of Profile Line.
Right: QUIT this.
You may query the displayed raster map layer by indicating points with the left mouse-button. The coordinates and category value of each point that you indicate will be displayed on in the status frame. If you mark the first point of the profile line you will be presented with the following mouse-button menu:
Mouse Buttons:
Left: Where am I?
Middle: Mark SECOND Point of Profile Line.
Right: QUIT this.
Once you mark the second point of the profile line, the profile line will be labeled (with a letter from A to D) and displayed in one of the four display frames on the right hand side of the screen. You will then be presented with a third mouse-button menu:
Mouse Buttons:
Left: DO ANOTHER
Middle: CLEAR DISPLAY
Right: QUIT this.
If you would like to view another profile, click on the left mouse-button. If you would like to redisplay the raster map layer and clear out the four profile frames, click on the middle mouse-button. If you would like to quit, then click on the right button.

If you selected the plotfile option, you will have up to four files starting with the name and followed by a suffix of the plot letter A, B, C, or D. The plots that are written to these files reflect the last of each plot done with that letter (i.e. They will match what's in the display when you quit).

The format of the plot files is not geared toward any particular software, but should be easy to coax into a number of other programs. The first three lines contain some header information about the plot, each prefixed with a # sign to denote a comment. This is followed by a blank line, and then each value for every stop along the way of the profile. The number of values will vary depending on the length of the profile, cell resolution and the slope angle of the profile line. Below is an example of a plotfile:

# Profile A of fract@PERMANENT
# From (-311.5727003, 700.29673591) to (560.83086053, 267.06231454)
# Stats: Count = 45, Min = -3332.379353, Max = 1389.142386

-273.619575
-434.155326
-805.505372
...

NOTES

Useful enhancements to d.profile would include:
  1. Adding an option to display profiles using category colors, like a bar-chart.
  2. Allowing profile lines to be defined by a series of points, not just two.
  3. Allowing profiles to be saved in a file, for later viewing by GRASS.
  4. Allowing the user to enter profile line points by typing coordinates.

BUGS

None known.

AUTHOR

Dave Johnson
DBA Systems, Inc.
10560 Arrowhead Drive
Fairfax, Virginia 22030

Modified by Eric G. Miller for profile output, and support of floating point rasters (11-Nov-2000).