Class InteriorPointFinder
java.lang.Object
com.vividsolutions.jump.geom.InteriorPointFinder
Find a reasonable point at which to label a Geometry.
Algorithm is:
- Find the intersections between the geometry and a line halfway down the envelope
- Pick the midpoint of the largest intersection (the intersections will be lines and points)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.locationtech.jts.geom.GeometryenvelopeMiddle(org.locationtech.jts.geom.Geometry geometry) org.locationtech.jts.geom.CoordinatefindPoint(org.locationtech.jts.geom.Geometry geometry) Finds a reasonable point at which to label a Geometry.protected org.locationtech.jts.geom.GeometrywidestGeometry(org.locationtech.jts.geom.Geometry geometry)
-
Constructor Details
-
InteriorPointFinder
public InteriorPointFinder()
-
-
Method Details
-
findPoint
public org.locationtech.jts.geom.Coordinate findPoint(org.locationtech.jts.geom.Geometry geometry) Finds a reasonable point at which to label a Geometry.- Parameters:
geometry- the geometry to analyze- Returns:
- the midpoint of the largest intersection between the geometry and a line halfway down its envelope
-
widestGeometry
protected org.locationtech.jts.geom.Geometry widestGeometry(org.locationtech.jts.geom.Geometry geometry) -
envelopeMiddle
protected org.locationtech.jts.geom.Geometry envelopeMiddle(org.locationtech.jts.geom.Geometry geometry)
-