Class InteriorPoint

java.lang.Object
org.locationtech.jts.algorithm.InteriorPoint

public class InteriorPoint extends Object
Computes an interior point of a Geometry. An interior point is guaranteed to lie in the interior of the Geometry, if it possible to calculate such a point exactly. Otherwise, the point may lie on the boundary of the geometry.

The interior point of an empty geometry is null.

  • Constructor Details

    • InteriorPoint

      public InteriorPoint()
  • Method Details

    • getInteriorPoint

      public static Coordinate getInteriorPoint(Geometry geom)
      Compute a location of an interior point in a Geometry. Handles all geometry types.
      Parameters:
      geom - a geometry in which to find an interior point
      Returns:
      the location of an interior point, or null if the input is empty