Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
r.profile(1)		    GRASS GIS User's Manual		  r.profile(1)

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

KEYWORDS
       raster, profile,	transect

SYNOPSIS
       r.profile
       r.profile --help
       r.profile     [-gc]	input=name	 [output=name]	      [coordi-
       nates=east,north[,east,north,...]]    [file=name]    [resolution=float]
       [null_value=string]   [units=string]   [--overwrite]  [--help]  [--ver-
       bose]  [--quiet]	 [--ui]

   Flags:
       -g
	   Output  easting  and	 northing  in first two	columns	of four	column
	   output

       -c
	   Output RRR:GGG:BBB color values for each profile point

       --overwrite
	   Allow output	files to overwrite existing files

       --help
	   Print usage summary

       --verbose
	   Verbose module output

       --quiet
	   Quiet module	output

       --ui
	   Force launching GUI dialog

   Parameters:
       input=nameA [required]
	   Name	of input raster	map

       output=name
	   Name	of file	for output (use	output=- for stdout)
	   Default: -

       coordinates=east,north[,east,north,...]
	   Profile coordinate pairs

       file=name
	   Name	of input file containing coordinate pairs
	   Use instead of the 'coordinates' option. "-"	reads from stdin.

       resolution=float
	   Resolution along profile (default = current region resolution)

       null_value=string
	   String representing NULL value
	   Default: *

       units=string
	   Units
	   If units are	not specified, current location	units are used.	Meters
	   are used by default in geographic (latlon) locations.
	   Options: meters, kilometers,	feet, miles

DESCRIPTION
       This  program outputs two or four column	(with -g) data to stdout or an
       ASCII file. The default two column output consists of  cumulative  pro-
       file  length and	raster value. The optional four	column output consists
       of easting, northing, cumulative	profile	length,	and raster value. Pro-
       file  end  or "turning" points can be set manually with the coordinates
       argument. The profile resolution, or distance between  profile  points,
       is  obtained from the current region resolution,	or can be manually set
       with the	resolution argument.

       The coordinates parameter can be	set to comma separated geographic  co-
       ordinates  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.

OUTPUT FORMAT
       The multi column	output from r.profile is  intended  for	 easy  use  in
       other  programs.	  The output can be piped (|) directly into other pro-
       grams or	saved to a file	for later use. Output with geographic  coordi-
       nates  (-g) is compatible with v.in.ascii and can be piped direcly into
       this program.
       r.profile -g input=elevation coordinates=... | v.in.ascii output=elevation_profile separator=space
       The 2 column output is compatible with most plotting programs.

       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 de-
       fault unit.

NOTES
       The profile resolution is measured exactly from	the  supplied  end  or
       "turning" point along the profile. The end of a profile segment will be
       an exact	multiple of the	profile	resolution and will therefore not  al-
       ways match the end point	coordinates entered for	the segmanet.

       To extract the numbers in scripts, following parameters can be used:
       r.profile input=dgm12.5 coordinates=3570631,5763556 2>/dev/null
       This filters out	the everything except the numbers.

EXAMPLES
   Extraction of values	along profile defined by coordinates (variant 1)
       Extract	a  profile with	coordinates (wayoints) provided	on the command
       line (North Carolina data set):
       g.region	raster=elevation -p
       r.profile -g input=elevation output=profile_points.csv \
		 coordinates=641712,226095,641546,224138,641546,222048,641049,221186
       This will extract a profile along the track defined by the three	 coor-
       dinate	pairs.	 The   output	file   "profile_points.csv"   contains
       east,north,distance,value (here:	elevation).

   Extraction of values	along profile defined by coordinates (variant 2)
       Coordinate pairs	can also being "piped" into r.profile (variant 2a):
       r.profile elevation resolution=1000 file=- << EOF
       641712,226095
       641546,224138
       641546,222048
       641049,221186
       EOF

       Coordinate pairs	can also being "piped" into r.profile (variant 2b):
       echo "641712,226095
       641546,224138
       641546,222048
       641049,221186" >	coors.txt
       cat coors.txt | r.profile elevation resolution=1000 file=-
       The output is printed into the terminal (unless the output parameter is
       used) and looks as follows:
       Using resolution: 1000 [meters]
       Output columns:
       Along track dist. [meters], Elevation
       Approx. transect	length:	1964.027749 [meters]
	0.000000 84.661507
	1000.000000 98.179062
       Approx. transect	length:	2090.000000 [meters]
	1964.027749 83.638138
	2964.027749 89.141029
	3964.027749 78.497757
       Approx. transect	length:	995.014070 [meters]
	4054.027749 73.988029

SEE ALSO
	v.in.ascii, r.what, r.transect,	wxGUI profile tool

AUTHOR
       Bob Covill

SOURCE CODE
       Available at: r.profile source code (history)

       Main  index  | Raster index | Topics index | Keywords index | Graphical
       index | Full index

       A(C) 2003-2020 GRASS Development	Team, GRASS GIS	7.8.3 Reference	Manual

GRASS 7.8.3							  r.profile(1)

NAME | KEYWORDS | SYNOPSIS | DESCRIPTION | OUTPUT FORMAT | NOTES | EXAMPLES | SEE ALSO | AUTHOR | SOURCE CODE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=r.profile&sektion=1&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help