GRASS logo

NAME

v.profile - Vector map profiling tool

KEYWORDS

vector, profile, transect

SYNOPSIS

v.profile
v.profile help
v.profile [-cz] input=name [type=string[,string,...]] [east_north=east,north[,east,north,...]] buffer=float [out_file=string] [fs=string] [dp=integer] [where=sql_query] [layer=integer] [map_output=name] [profile_map=name] [profile_where=sql_query] [profile_layer=integer] [--overwrite] [--verbose] [--quiet]

Flags:

-c
Do not print column names
-z
Do not print 3D vector data (z values)
Only affects 3D vectors
--overwrite
Allow output files to overwrite existing files
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

input=name
Name of input vector map
type=string[,string,...]
Feature type
Options: point,line
Default: point,line
east_north=east,north[,east,north,...]
Coordinates for profiling line nodes
Specify profiling line vertexes and nodes
buffer=float
Buffer (tolerance) for points in map units
How far points can be from sampling line
Default: 10
out_file=string
Path to output text file or - for stdout
Default: -
fs=string
Field separator
Default: |
dp=integer
Number of significant digits
Options: 0-32
Default: 2
where=sql_query
WHERE conditions of SQL statement without 'where' keyword
Example: income < 1000 and inhab >= 10000
layer=integer
Layer number
Use features only from specified layer
Default: 1
map_output=name
Name for profile line and buffer output map
Profile line and buffer around it will be written
profile_map=name
Profiling line map
Vector map containing profiling line
profile_where=sql_query
WHERE conditions for input profile line map
Use to select only one line from profiling line map
profile_layer=integer
Profiling line map layer
Default: 1

DESCRIPTION

This module will print out distance and attributes to points/lines along profiling line. Distance is calculated from first profiling line coordinate pair or from the beginning of vector line (use "Line directions" feature in gis.m to see distance calculation direction). Output can go to file or stdout. Output file will be overwritten without warning. Buffer (tolerance) parameter sets how far point can be located from profiling line and still be included in output data set. Output map option can be used to visualy check which points are profiled. Buffer (tolerance) setting does not affect lines. Lines are sampled at their crossing point with profiling line. By default Z values are printed if input vector is a 3D map. It can be disabled with -z flag. Profiling line can be provided as N,E coordinate pairs or can come from input vector map. As currently profiling line must be single line, one should use profile_where parameter to select single line from profile input map if it contains multiple features.

NOTE

Currently module can profile only points and lines (including 3D ones). Areas and other complex features are not supported. If one can provide reasonable examples how area sampling should work and why it's important, area (or any other feature type) sampling can be added.

EXAMPLES

Get point values and distance from the city and save into file for later usage. Will use ; as delimiter and three numbers after decimal separator for distance. Output file will contain data for all points, that are within 100m range to profiling line.
v.profile input=archsites@PERMANENT map_output=profiling_line buffer=100 \
          east_north=591518.55,4925722.38,592110.14,4920989.67 \
	  out_file=/home/user/archsites.distance dp=3 fs=';'

# Now let's see the output:
$cat archsites.distance
Number;Distance;cat;str1
1;446.958;24;"Hanson Ranch"
2;1386.149;11;"No Name"
3;2754.872;2;"No Name"
4;4559.578;13;"No Name"

Create river valley crossection and provide river marker:

# Take elevation samples
r.profile input=elevation.dem@PERMANENT output=/home/user/elevation.profile \
  profile=600570.27364,4920613.41838,600348.034348,4920840.38617
# Now get distance to place where river marker should be set
v.profile input=streams@PERMANENT out_file=/home/user/river.profile \
  east_north=600570.27364,4920613.41838,600348.034348,4920840.38617

BUGS

Strings are enclosed in double quotes ", still quotes within string are not escaped.

Vector CAT values are not outputed. Only way how to get CAT value is from attribute table.

SEE ALSO

r.profile

AUTHOR

Maris Nartiss

Last changed: $Date$


Main index - vector index - Full index

© 2003-2016 GRASS Development Team