|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vividsolutions.jts.algorithm.CentroidArea
public class CentroidArea
Computes the centroid of an area geometry.
http://www.faqs.org/faqs/graphics/algorithms-faq/
for further details of the basic approach.
The code has also be extended to handle degenerate (zero-area) polygons.
In this case, the centroid of the line segments in the polygon
will be returned.
Constructor Summary | |
---|---|
CentroidArea()
|
Method Summary | |
---|---|
void |
add(Coordinate[] ring)
Adds the area defined by an array of coordinates. |
void |
add(Geometry geom)
Adds the area defined by a Geometry to the centroid total. |
Coordinate |
getCentroid()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CentroidArea()
Method Detail |
---|
public void add(Geometry geom)
geom
- the geometry to addpublic void add(Coordinate[] ring)
ring
- an array of Coordinate
spublic Coordinate getCentroid()
|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |