GRASS logo

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

Table of contents

DESCRIPTION

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 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

Line centers

Area centers

EXAMPLE

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

SEE ALSO

v.centroids

AUTHOR

Markus Metz

SOURCE CODE

Available at: v.centerpoint source code (history)

Latest change: Monday Jan 30 19:52:26 2023 in commit: cac8d9d848299297977d1315b7e90cc3f7698730


Main index | Vector index | Topics index | Keywords index | Graphical index | Full index

© 2003-2023 GRASS Development Team, GRASS GIS 8.3.dev Reference Manual