Class: InteriorPointArea

jsts.algorithm.InteriorPointArea

new InteriorPointArea()

Computes a point in the interior of an areal geometry.

Algorithm

  • Find a Y value which is close to the centre of the geometry's vertical extent but is different to any of it's Y ordinates.
  • Create a horizontal bisector line using the Y value and the geometry's horizontal extent
  • Find the intersection between the geometry and the horizontal bisector line. The intersection is a collection of lines and points.
  • Pick the midpoint of the largest intersection geometry

KNOWN BUGS

  • If a fixed precision model is used, in some cases this method may return a point which does not lie in the interior.
Version:
  • 1.7
Source:

Methods

addPolygon(geometry)

Finds an interior point of a Polygon.
Parameters:
Name Type Description
geometry jsts.geom.Geometry the geometry to analyze
Source:

centre(envelope) → {jsts.geom.Coordinate}

Returns the centre point of the envelope.
Parameters:
Name Type Description
envelope jsts.geom.Envelope the envelope to analyze
Source:
Returns:
the centre of the envelope
Type
jsts.geom.Coordinate

getInteriorPoint() → {jsts.geom.Coordinate}

Gets the computed interior point.
Source:
Returns:
the coordinate of an interior point
Type
jsts.geom.Coordinate

(protected) horizontalBisector()

Source: