NAME
v.centerpoint - Calculate center points
KEYWORDS
vector,
geometry,
center
SYNOPSIS
v.centerpoint
v.centerpoint --help
v.centerpoint [-b] input=name [output=name] [type=string[,string,...]] [layer=string] [cats=range] [where=sql_query] [pcenter=string[,string,...]] [lcenter=string[,string,...]] [acenter=string[,string,...]] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
Flags:
- -b
- Do not build topology
- Advantageous when handling a large number of points
- --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=name [required]
- Name of input vector map
- Or data source for direct OGR access
- output=name
- Name for output vector map
- type=string[,string,...]
- Input feature type
- Options: point, line, area
- Default: point,line,area
- layer=string
- Layer number or name
- Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
- Default: 1
- cats=range
- Category values
- Example: 1,3,7-9,13
- where=sql_query
- WHERE conditions of SQL statement without 'where' keyword
- Example: income < 1000 and population >= 10000
- pcenter=string[,string,...]
- point center
- Options: mean, median, pmedian
- Default: mean
- mean: Center of gravity
- median: Geometric median (point of minimum distance)
- pmedian: Point closest to geometric median
- lcenter=string[,string,...]
- line center
- Options: mid, mean, median
- Default: mid
- mid: Line mid point
- mean: Center of gravity
- median: Geometric median (point of minimum distance) using line segments
- acenter=string[,string,...]
- area center
- Options: mean, median, bmedian
- Default: mean
- mean: Center of gravity
- median: Geometric median (point of minimum distance) using area sizes
- bmedian: Geometric median (point of minimum distance) using boundary segments
v.centerpoint calculates center points for point clouds, lines
and areas. Center points can be centers of gravity (coordinates' mean) or
geometric medians (points of minimum distance, which is more robust
in case of outliers.
For points, center points are calculated considering all points. For
lines and areas, center points are calculated for each line or area
separately.
If no output vector is given, center points are printed to stdout in
ASCII point format:
<easting>|<northing>|<height>|<cat>
The category values are
- 1 - mean of points
- 2 - median of points
- 3 - point closest to median of points
- 4 - mid point of each line
- 5 - mean of each line
- 6 - median of each line
- 7 - mean of each area
- 8 - median of each area using area triangulation
- 9 - median of each area using boundaries
If an output vector is given, categories of the respective lines and
areas are transferred from the selected layer to layer 1. Layer 2 holds
the same category values as for output to stdout.
Point centers
- mean - center of gravity, mean of all point coordinates
- median - geometric median, minimum distance to all points
- pmedian - point closest to the geometric median
Line centers
- mid - the mid point of each line, lies exactly on the line
- mean - center of gravity, mean of all line segments, might
not lie on the line
- median - geometric median, minimum distance to all line
segments, might not lie on the line
Area centers
- mean - center of gravity, calculated using area triangulation
- median - geometric median, minimum distance to area
triangulation, might not lie inside the area
- bmedian - geometric median, minimum distance to boundary
segments, might not lie inside the area
Calculate center of gravity for the LiDAR point cloud 'elev_lid_bepts'
in the North Carolina sample dataset:
v.centerpoint input=elev_lid_bepts output=elev_lid_bepts_mean
v.centerpoint in=urbanarea out=urbanarea_median acenter=median
v.centroid
Markus Metz
Last changed: $Date: 2014-02-03 09:22:15 +0100 (Mon, 03 Feb 2014) $
SOURCE CODE
Available at: v.centerpoint source code (history)
Main index |
Vector index |
Topics index |
Keywords index |
Graphical index |
Full index
© 2003-2019
GRASS Development Team,
GRASS GIS 7.4.5svn Reference Manual