v.profile(1)
π v.profile π
okay bestie, welcome to v.profile, a GRASS GIS User's Manual page π«Ά (that's the manual name, it's literally in the title up top, iykyk). We're in the vector toolkit today and this one is the profiling tool. Grab a snack π
β¨ KEYWORDS β¨
vector, profile, transect
transectβ¦ the way that word alone is giving main character energy π
πΈ SYNOPSIS πΈ
okay so here's the whole vibe check on how you call it:
v.profile
v.profile --help
v.profile [-cz] input=name [type=string[,string,...]]
[where=sql_query] [layer=string] [output=string]
[separator=character] [dp=integer] buffer=float [map_output=name]
[coordinates=east,north[,east,north,...]] [profile_map=name]
[profile_where=sql_query] [profile_layer=integer] [--overwrite]
[--help] [--verbose] [--quiet] [--ui]
π FLAGS π
-cβ do not print column names π like, skip the header row bestie-zβ do not print 3D vector data (z values). ngl this only affects 3D vectors, so if ur map is flat it's just sitting there being decorative π--overwriteβ allow output files to overwrite existing files π€ (yes it will absolutely eat ur old file, that's the point)--helpβ print usage summary β¨--verboseβ verbose module output π£οΈ--quietβ quiet module output π€«--uiβ force launching GUI dialog π±οΈ
π¦ PARAMETERS π¦
input=name[required] β Name of input vector map. Or data source for direct OGR access πtype=string[,string,...]β Input feature type. Options:point,line. Default:point,linewhere=sql_queryβ WHERE conditions of SQL statement without 'where' keyword. Example:income < 1000 and population >= 10000layer=stringβ Layer number or name. Use features only from specified layer. Default:1output=stringβ Path to output text file or-for stdout. Default:-separator=characterβ Field separator. Special characters:pipe,comma,space,tab,newline. Default:pipedp=integerβ Number of significant digits. Options:0-32. Default:2buffer=float[required] β Buffer (tolerance) for points in map units. How far points can be from sampling line. Default:10map_output=nameβ Name for profile line and buffer output map. Profile line and buffer around it will be written π«coordinates=east,north[,east,north,...]β Coordinates for profiling line nodes. Specify profiling line vertexes and nodes πprofile_map=nameβ Profiling line map. Vector map containing profiling lineprofile_where=sql_queryβ WHERE conditions for input profile line map. Use to select only one line from profiling line mapprofile_layer=integerβ Profiling line map layer. Default:1
π DESCRIPTION π
v.profile prints out distance and attributes of points/lines along a profiling line. Distance is calculated from the first profiling line coordinate pair or from the beginning of vector line π§
The buffer (tolerance) parameter sets how far a point can be located from a profiling line and still be included in the output data set. The output map option can be used to visually check which points are profiled. The buffer (tolerance) setting does not affect lines. Lines are sampled at their crossing point with the profiling line β¨
By default Z values are printed if input vector is a 3D map. It can be disabled with the -z flag.
The profiling line can be provided as N,E coordinate pairs or from an input vector map. As a profiling line must be a single line, the user should use the profile_where parameter to select a single line from a profile input map if it contains multiple vector features π
π NOTES π
Currently the module can profile only points and lines (including 3D ones). Areas and other complex features are not supported. If in future users can provide reasonable examples how area sampling should work and why it is important, area (or any other feature type) sampling can be added π€·βοΈ
okay so real talk bestie π Due to bugs in GRASS native buffering algorithms, this module for now depends on GEOS and will not function if GRASS is compiled without GEOS. This restriction will be removed as soon as GRASS native buffer generation is fixed. no cap.
π₯ EXAMPLES π₯
List all geonames along part of road NC-96 (NC Basic dataset)
The output will be stored in a file for later usage. We will use comma as delimiter and three numbers after decimal separator for distance. Output file will contain data for all points, that are within 500 m range to profiling line π
v.profile input=geonames@PERMANENT output=/home/user/NC_96_geonames.csv\
separator=comma dp=3 buffer=500 profile_map=roadsmajor@PERMANENT profile_where=cat=56
# Now lets see the output:
cat NC_96_geonames.csv
Number,Distance,cat,GEONAMEID,NAME,ASCIINAME,ALTERNATEN,FEATURECLA,FEATURECOD,COUNTRYCOD,CC2,ADMIN1,POPULATION,ELEVATION,GTOPO30,TIMEZONE,MODIFICATI,PPLKEY,SRC_ID,MAINT_ID
1,360.719,26881,4482019,"New Zebulon Elementary School","New Zebulon Elementary School","","S","SCH","US","","NC",0,106,91,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
2,846.806,22026,4476596,"Little River, Township of","Little River, Township of","","A","ADMD","US","","NC",0,0,91,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
3,2027.918,16681,4470608,"Hendricks Pond","Hendricks Pond","","H","RSV","US","","NC",0,0,91,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
4,2027.918,16690,4470622,"Hendricks Dam","Hendricks Dam","","S","DAM","US","","NC",0,0,91,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
5,2999.214,39338,4496159,"Union Chapel","Union Chapel","","","","US","","NC",0,0,96,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
6,3784.992,43034,4500325,"Zebulon Airport","Zebulon Airport","","S","AIRP","US","","NC",0,108,98,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
Create river valley crossection and provide river marker (Spearfish dataset)
# 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 output=/home/user/river_profile.csv \
east_north=600570.27364,4920613.41838,600348.034348,4920840.38617
π BUGS π
- Strings are enclosed in double quotes
", still quotes within string are not escaped π - Output does not contain Vector CAT values. Only way how to get CAT value is from the attribute table π
- If sampled feature (point, line) contains multiple attribute entries (has multiple CAT values), only the first one is reported. If this is a limitation in some practical use case, a feature request in GRASS GIS issue tracker should be opened π«Ά
π«Ά SEE ALSO π«Ά
r.profile, Linear Referencing System
π AUTHOR π
Maris Nartiss
β SOURCE CODE β
Available at: v.profile source code (history)
Accessed: Saturday Jan 17 05:41:29 2026
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page bestie πΈ this was the GRASS GIS 8.4.2 Reference Manual version of v.profile(1), Β© 2003-2025 GRASS Development Team, and yeah we're on GRASS 8.4.2 at the bottom there. slay, go profile something β¨π
π¦
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms