Class PreparedPoint

  • All Implemented Interfaces:
    PreparedGeometry

    public class PreparedPoint
    extends java.lang.Object
    A prepared version for Puntal geometries.

    Instances of this class are thread-safe.

    Author:
    Martin Davis
    • Constructor Detail

      • PreparedPoint

        public PreparedPoint​(Puntal point)
    • Method Detail

      • intersects

        public boolean intersects​(Geometry g)
        Tests whether this point intersects a Geometry.

        The optimization here is that computing topology for the test geometry is avoided. This can be significant for large geometries.

        Specified by:
        intersects in interface PreparedGeometry
        Parameters:
        g - the Geometry to test
        Returns:
        true if this Geometry intersects the given Geometry
        See Also:
        Geometry.intersects(Geometry)
      • 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