public class InteriorPointArea extends Object
This algorithm is a tradeoff between performance and point quality (where points further from the geometry boundary are considered to be higher quality) Priority is given to performance. This means that the computed interior point may not be suitable for some uses (such as label positioning).
The algorithm handles some kinds of invalid/degenerate geometry, including zero-area and self-intersecting polygons.
Empty geometry is handled by returning a null
point.
Constructor and Description |
---|
InteriorPointArea(Geometry g)
Creates a new interior point finder for an areal geometry.
|
Modifier and Type | Method and Description |
---|---|
Coordinate |
getInteriorPoint()
Gets the computed interior point.
|
static Coordinate |
getInteriorPoint(Geometry geom)
Computes an interior point for the
polygonal components of a Geometry.
|
public InteriorPointArea(Geometry g)
g
- an areal geometrypublic static Coordinate getInteriorPoint(Geometry geom)
geom
- the geometry to computenull
if the geometry has no polygonal componentspublic Coordinate getInteriorPoint()
null
if the input geometry is emptyCopyright © 2020. All rights reserved.