The coordinates parameter can be set to comma separated geographic coordinates for profile line endpoints. Alternatively the coordinate pairs can be piped from the text file specified by file option, or if set to "-", from stdin. In these cases the coordinate pairs should be given one comma separated pair per line.
The resolution 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 r.profile uses the resolution of the current GRASS region.
The null parameter can optionally be set to change the character string representing null values.
r.profile -g input=elevation coordinates=... | v.in.ascii output=elevation_profile separator=space
The optional RGB output provides the associated GRASS colour value for each profile point.
Option units enables to set units of the profile length output. If the units are not specified, current location units will be used. In case of geographic locations (latitude/longitude), meters are used as default unit.
r.profile input=elevation output=profile_points coordinates=562517,7779433,562984,7779533,563875,7779800
Example 2
Pipe coordinates into r.profile
r.profile elevation.dem res=1000 file=- << EOF 591243,4926344 592509,4922156 594100,4920793 599910,4919365 602929,4919235 604844,4918391 606468,4917190 607766,4915664 EOF
To extract the numbers in scripts, following parameters can be used:
r.profile input=dgm12.5 coordinates=3570631,5763556 2>/dev/null
Last changed: $Date$