public class InteriorPointArea
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
InteriorPointArea.SafeBisectorFinder
Finds a safe bisector Y ordinate
by projecting to the Y axis
and finding the Y-ordinate interval
which contains the centre of the Y extent.
|
Modifier and Type | Field and Description |
---|---|
private GeometryFactory |
factory |
private Coordinate |
interiorPoint |
private double |
maxWidth |
Constructor and Description |
---|
InteriorPointArea(Geometry g)
Creates a new interior point finder
for an areal geometry.
|
Modifier and Type | Method and Description |
---|---|
private void |
add(Geometry geom)
Tests the interior vertices (if any)
defined by an areal Geometry for the best inside point.
|
private void |
addPolygon(Geometry geometry)
Finds an interior point of a Polygon.
|
private static double |
avg(double a,
double b) |
static Coordinate |
centre(Envelope envelope)
Returns the centre point of the envelope.
|
Coordinate |
getInteriorPoint()
Gets the computed interior point.
|
protected LineString |
horizontalBisector(Geometry geometry) |
private Geometry |
widestGeometry(Geometry geometry) |
private Geometry |
widestGeometry(GeometryCollection gc) |
private GeometryFactory factory
private Coordinate interiorPoint
private double maxWidth
public InteriorPointArea(Geometry g)
g
- an areal geometryprivate static double avg(double a, double b)
public Coordinate getInteriorPoint()
private void add(Geometry geom)
geom
- the geometry to addprivate void addPolygon(Geometry geometry)
geometry
- the geometry to analyzeprivate Geometry widestGeometry(GeometryCollection gc)
protected LineString horizontalBisector(Geometry geometry)
public static Coordinate centre(Envelope envelope)
envelope
- the envelope to analyze