Class PreparedPolygon

  • All Implemented Interfaces:
    PreparedGeometry

    public class PreparedPolygon
    extends java.lang.Object
    A prepared version for Polygonal geometries. This class supports both Polygons and MultiPolygons.

    This class does not support MultiPolygons which are non-valid (e.g. with overlapping elements).

    Instances of this class are thread-safe and immutable.

    Author:
    mbdavis
    • Constructor Detail

      • PreparedPolygon

        public PreparedPolygon​(Polygonal poly)
    • Method Detail

      • getIntersectionFinder

        public FastSegmentSetIntersectionFinder getIntersectionFinder()
        Gets the indexed intersection finder for this geometry.
        Returns:
        the intersection finder
      • getRepresentativePoints

        public java.util.List getRepresentativePoints()
        Gets the list of representative points for this geometry. One vertex is included for every component of the geometry (i.e. including one for every ring of polygonal geometries). Do not modify the returned list!
        Returns:
        a List of Coordinate
      • isAnyTargetComponentInTest

        public boolean isAnyTargetComponentInTest​(Geometry testGeom)
        Tests whether any representative of the target geometry intersects the test geometry. This is useful in A/A, A/L, A/P, L/P, and P/P cases.
        Parameters:
        testGeom - the test geometry
        Returns:
        true if any component intersects the areal test geometry
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object