Class PreparedPoint

java.lang.Object
org.locationtech.jts.geom.prep.PreparedPoint
All Implemented Interfaces:
PreparedGeometry

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

Instances of this class are thread-safe.

Author:
Martin Davis
  • Constructor Details

    • PreparedPoint

      public PreparedPoint(Puntal point)
  • Method Details

    • 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:
    • getGeometry

      public Geometry getGeometry()
      Description copied from interface: PreparedGeometry
      Gets the original Geometry which has been prepared.
      Specified by:
      getGeometry in interface PreparedGeometry
      Returns:
      the base geometry
    • getRepresentativePoints

      public 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
    • contains

      public boolean contains(Geometry g)
      Default implementation.
      Specified by:
      contains in interface PreparedGeometry
      Parameters:
      g - the Geometry to test
      Returns:
      true if this Geometry contains the given Geometry
      See Also:
    • containsProperly

      public boolean containsProperly(Geometry g)
      Default implementation.
      Specified by:
      containsProperly in interface PreparedGeometry
      Parameters:
      g - the Geometry to test
      Returns:
      true if this Geometry properly contains the given Geometry
      See Also:
    • coveredBy

      public boolean coveredBy(Geometry g)
      Default implementation.
      Specified by:
      coveredBy in interface PreparedGeometry
      Parameters:
      g - the Geometry to test
      Returns:
      true if this Geometry is covered by the given Geometry
      See Also:
    • covers

      public boolean covers(Geometry g)
      Default implementation.
      Specified by:
      covers in interface PreparedGeometry
      Parameters:
      g - the Geometry to test
      Returns:
      true if this Geometry covers the given Geometry
      See Also:
    • crosses

      public boolean crosses(Geometry g)
      Default implementation.
      Specified by:
      crosses in interface PreparedGeometry
      Parameters:
      g - the Geometry to test
      Returns:
      true if this Geometry crosses the given Geometry
      See Also:
    • disjoint

      public boolean disjoint(Geometry g)
      Standard implementation for all geometries. Supports GeometryCollections as input.
      Specified by:
      disjoint in interface PreparedGeometry
      Parameters:
      g - the Geometry to test
      Returns:
      true if this Geometry is disjoint from the given Geometry
      See Also:
    • overlaps

      public boolean overlaps(Geometry g)
      Default implementation.
      Specified by:
      overlaps in interface PreparedGeometry
      Parameters:
      g - the Geometry to test
      Returns:
      true if this Geometry overlaps the given Geometry
      See Also:
    • touches

      public boolean touches(Geometry g)
      Default implementation.
      Specified by:
      touches in interface PreparedGeometry
      Parameters:
      g - the Geometry to test
      Returns:
      true if this Geometry touches the given Geometry
      See Also:
    • within

      public boolean within(Geometry g)
      Default implementation.
      Specified by:
      within in interface PreparedGeometry
      Parameters:
      g - the Geometry to test
      Returns:
      true if this Geometry is within the given Geometry
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object