com.vividsolutions.jts.algorithm
Class CentroidPoint
java.lang.Object
com.vividsolutions.jts.algorithm.CentroidPoint
public class CentroidPoint
- extends Object
Computes the centroid of a point geometry.
Algorithm
Compute the average of all points.
- Version:
- 1.7
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CentroidPoint
public CentroidPoint()
add
public void add(Geometry geom)
- Adds the point(s) defined by a Geometry to the centroid total.
If the geometry is not of dimension 0 it does not contribute to the centroid.
- Parameters:
geom
- the geometry to add
add
public void add(Coordinate pt)
- Adds the length defined by an array of coordinates.
- Parameters:
pts
- an array of Coordinate
s
getCentroid
public Coordinate getCentroid()
Copyright © 2012. All Rights Reserved.