.TH r.profile 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBr.profile\fR\fR - Outputs the raster map layer values lying on user-defined line(s). .SH KEYWORDS raster, profile .SH SYNOPSIS \fBr.profile\fR .br \fBr.profile help\fR .br \fBr.profile\fR [\-\fBigc\fR] \fBinput\fR=\fIname\fR [\fBoutput\fR=\fIstring\fR] [\fBprofile\fR=\fIeast,north\fR[,\fIeast,north\fR,...]] [\fBres\fR=\fIfloat\fR] [\fBnull\fR=\fIstring\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Flags: .IP "\fB\-i\fR" 4m .br Interactively select End-Points .IP "\fB\-g\fR" 4m .br Output easting and northing in first two columns of four column output .IP "\fB\-c\fR" 4m .br Output RRR:GGG:BBB color values for each profile point .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .PP .SS Parameters: .IP "\fBinput\fR=\fIname\fR" 4m .br Name of input raster map .IP "\fBoutput\fR=\fIstring\fR" 4m .br Name of file for output (use output=- for stdout) .br Default: \fI-\fR .IP "\fBprofile\fR=\fIeast,north[,\fIeast,north\fR,...]\fR" 4m .br Profile coordinate pairs .IP "\fBres\fR=\fIfloat\fR" 4m .br Resolution along profile (default = current region resolution) .IP "\fBnull\fR=\fIstring\fR" 4m .br Character to represent no data cell .br Default: \fI*\fR .PP .SH DESCRIPTION This program outputs two or four column (with \fB-g\fR) data to stdout or an ASCII file. The default two column output consists of cumulative profile length (in meters) and raster value. The optional four column output consists of easting, northing, cumlative profile length (m), and raster value. Profile end or "turning" points can be set manually with the \fBprofile\fR argument or selected interactively from the GRASS monitor by setting the \fB-i\fR flag. The profile resolution, or distance between profile points, is obtained from the current region resolution, or can be manually set with the \fBres\fR argument. .PP The \fB-i\fR flag allows the user for selecting the profile from the GRASS monitor by clicking the left mouse button along the profile; clicking the right mouse button ends the profile. .PP The \fBprofile\fR parameter can be set to comma separated geographic coordinates for profile line endpoints. The interactive flag (\fB-i\fR) overrides this option. Alternatively the coordinate pairs can be piped from stdin, one comma separated pair per line. .PP The \fBres\fR parameter sets the distance between each profile point (resolution). The resolution must be provided in GRASS database units (i.e. decimal degrees for Lat Long databases and meters for UTM). By default \fIr.profile\fR uses the resolution of the current GRASS region. .PP The \fBnull\fR parameter can optionally be set to change the character string representing null values. .SH OUTPUT FORMAT The multi column output from \fIr.profile\fR is intended for easy use in other programs. The output can be piped (|) directly into other programs or saved to a file for later use. Output with geographic coordinates (\fI-g\fR) is compatible with \fIv.in.ascii\fR and can be piped direcly into this program. \fC .DS .br r.profile \-ig input=elev.rast | v.in.ascii output=elev.profile fs=space .br .DE \fR The 2 column output is compatible with most plotting programs. .PP The optional RGB output provides the associated GRASS colour value for each profile point. .SH EXAMPLES \fBExample 1\fR .br Extract a profile with coordinates provided on the command line: \fC .DS .br r.profile input=elev.rast output=profile.pts profile=562517,7779433,562984,7779533,563875,7779800 .br .DE \fR This will extract a profile along the track defined by the three coordinate pairs. .PP .br \fBExample 2\fR .br Extract a profile by interactively selecting the profile route from the GRASS monitor: \fC .DS .br r.profile \-i input=elev.rast output=profile.pts .br .DE \fR Use the left mouse button to select the profile route in the GRASS monitor. Use the right mouse button to end the profile. .PP .br \fBExample 3\fR .br Extract a profile with coordinates provided from standard input or an external file: .PP First create a points file with \fId.where\fR \fC .DS .br d.where > saved.points .br .DE \fR Then pipe the points file into r.profile \fC .DS .br cat saved.points | r.profile input=elev.rast output=profile.pts .br .DE \fR The advantage of this method is that the same profile points can be piped into different GRASS rasters by changing the input parameter. .PP With this method the coordinates must be given as space or tab separated easting and northing. Labels after these values are ignored. .PP Another example using d.where: \fC .DS .br d.where | r.profile elevation.dem .br .DE \fR .PP .br \fBExample 4\fR .br Pipe coordinates into r.profile \fC .DS .br r.profile elevation.dem res=1000 << EOF .br 591243,4926344 .br 592509,4922156 .br 594100,4920793 .br 599910,4919365 .br 602929,4919235 .br 604844,4918391 .br 606468,4917190 .br 607766,4915664 .br EOF .br .DE \fR .SH NOTES The profile resolution is measured exactly from the supplied end or \(dqturning" point along the profile. The end of a profile segment will be an exact multiple of the profile resolution and will therefore not always match the end point coordinates entered for the segmanet. .PP To extract the numbers in scripts, following parameters can be used: \fC .DS .br r.profile input=dgm12.5 profile=3570631,5763556 2>/dev/null .br .DE \fR This filters out the everything except the numbers. .SH SEE ALSO \fIv.in.ascii\fR, \fId.where\fR, \fId.profile\fR, \fIr.what\fR, \fIr.transect\fR, \fIgis.m: PROFILE TOOL\fR .SH AUTHOR Bob Covill .PP \fILast changed: $Date: 2010-01-15 15:57:25 +0100 (Fri, 15 Jan 2010) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team