Class InteriorPointLine


  • public class InteriorPointLine
    extends java.lang.Object
    Computes a point in the interior of an linear geometry.

    Algorithm

    • Find an interior vertex which is closest to the centroid of the linestring.
    • If there is no interior vertex, find the endpoint which is closest to the centroid.
    Version:
    1.7
    • Field Detail

      • minDistance

        private double minDistance
    • Constructor Detail

      • InteriorPointLine

        public InteriorPointLine​(Geometry g)
    • Method Detail

      • getInteriorPoint

        public Coordinate getInteriorPoint()
      • addInterior

        private void addInterior​(Geometry geom)
        Tests the interior vertices (if any) defined by a linear Geometry for the best inside point. If a Geometry is not of dimension 1 it is not tested.
        Parameters:
        geom - the geometry to add
      • addInterior

        private void addInterior​(Coordinate[] pts)
      • addEndpoints

        private void addEndpoints​(Geometry geom)
        Tests the endpoint vertices defined by a linear Geometry for the best inside point. If a Geometry is not of dimension 1 it is not tested.
        Parameters:
        geom - the geometry to add
      • addEndpoints

        private void addEndpoints​(Coordinate[] pts)