Interface ProjectedGeometryOperations

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <P extends C2D,​G extends Geometry<P> & Polygonal<P>>
      double
      area​(G geometry)
      Calculates the area of the specified Geometry.
      <P extends C2D>
      Geometry<P>
      boundary​(Geometry<P> geometry)
      Calculates the boundary of the specified Geometry.
      <P extends C2D>
      Geometry<P>
      buffer​(Geometry<P> geometry, double distance)
      Calculates a Geometry that represents all points whose distance from the specified Geometry is less than or equal the specified distance.
      <P extends C2D,​G extends Geometry<P> & Polygonal<P>>
      Point<P>
      centroid​(G geometry)
      Calculates a centroid for the specified Geometry.
      <P extends C2D>
      boolean
      contains​(Geometry<P> geometry, Geometry<P> other)
      Checks if the first specified Geometry spatially contains the second.
      <P extends C2D>
      Geometry<P>
      convexHull​(Geometry<P> geometry)
      Calculates the convex hull of the specified Geometry.
      <P extends C2D>
      boolean
      crosses​(Geometry<P> geometry, Geometry<P> other)
      Checks if the specified Geometrys cross.
      <P extends C2D>
      Geometry<P>
      difference​(Geometry<P> geometry, Geometry<P> other)
      Calculates the point set difference of the specified Geometrys.
      <P extends C2D>
      double
      distance​(Geometry<P> geometry, Geometry<P> other)
      Calculates the shortest distance between any two points in the two Geometrys in the coordinate reference system of this Geometry.
      <P extends C2D>
      Geometry<P>
      intersection​(Geometry<P> geometry, Geometry<P> other)
      Calculates the point set intersection of the specified Geometrys.
      <P extends C2D>
      boolean
      intersects​(Geometry<P> geometry, Geometry<P> other)
      Checks if the specified Geometrys intersect.
      <P extends C2D>
      boolean
      isSimple​(Geometry<P> geometry)
      Tests the simplicity of the specified Geometry.
      <P extends C2D,​G extends Geometry<P> & Linear<P>>
      double
      length​(G geometry)
      Calculates the length of the specified Geometry.
      <P extends C2D>
      boolean
      overlaps​(Geometry<P> geometry, Geometry<P> other)
      Checks if the specified Geometrys overlap.
      <P extends C2D>
      boolean
      relates​(Geometry<P> geometry, Geometry<P> other, String matrix)
      Checks if the specified Geometrys are spatially related by testing for intersections between the interior, boundary and exterior of the two geometric objects as specified by the values in the intersection pattern matrix.
      <P extends C2D,​G extends Geometry<P>>
      G
      reverse​(G geometry)
      Creates a Geometry with the positions of the input Geometry in reverse order.
      <P extends C2D>
      Geometry<P>
      symmetricDifference​(Geometry<P> geometry, Geometry<P> other)
      Calculates the point set symmetric difference of the specified Geometrys.
      <P extends C2D>
      boolean
      touches​(Geometry<P> geometry, Geometry<P> other)
      Checks if the specified Geometrys touch.
      <P extends C2D>
      Geometry<P>
      union​(Geometry<P> geometry, Geometry<P> other)
      Calculates the point set union of the specified Geometrys.
    • Method Detail

      • isSimple

        <P extends C2D> boolean isSimple​(Geometry<P> geometry)
        Tests the simplicity of the specified Geometry.
        Parameters:
        geometry - the Geometry to test for simplicity.
        Returns:
        True iff the specified Geometry is simple.
      • boundary

        <P extends C2DGeometry<P> boundary​(Geometry<P> geometry)
        Calculates the boundary of the specified Geometry.
        Parameters:
        geometry - the Geometry for which to calculate the boundary.
        Returns:
        a Geometry representing the boundary of the specified Geometry.
      • reverse

        <P extends C2D,​G extends Geometry<P>> G reverse​(G geometry)
        Creates a Geometry with the positions of the input Geometry in reverse order.
        Parameters:
        geometry - the Geometry to reverse
        Returns:
        a Geometry with the same positions as the specified input Geometry but in reverse order
      • intersects

        <P extends C2D> boolean intersects​(Geometry<P> geometry,
                                           Geometry<P> other)
        Checks if the specified Geometrys intersect.
        Parameters:
        geometry - the first Geometry operand of the intersection test
        other - the second Geometry operand of the intersection test
        Returns:
        true iff the specified Geometrys spatially intersect
      • touches

        <P extends C2D> boolean touches​(Geometry<P> geometry,
                                        Geometry<P> other)
        Checks if the specified Geometrys touch.
        Parameters:
        geometry - the first Geometry operand of the touch test
        other - the second Geometry operand of the touch test
        Returns:
        true iff the specified Geometrys spatially touch
      • crosses

        <P extends C2D> boolean crosses​(Geometry<P> geometry,
                                        Geometry<P> other)
        Checks if the specified Geometrys cross.
        Parameters:
        geometry - the first Geometry operand of the cross test
        other - the second Geometry operand of the cross test
        Returns:
        true iff the specified Geometrys spatially cross
      • contains

        <P extends C2D> boolean contains​(Geometry<P> geometry,
                                         Geometry<P> other)
        Checks if the first specified Geometry spatially contains the second.
        Parameters:
        geometry - the first Geometry operand of the containment test
        other - the second Geometry operand of the containment test
        Returns:
        true iff the first specified Geometry spatially contains the second
      • overlaps

        <P extends C2D> boolean overlaps​(Geometry<P> geometry,
                                         Geometry<P> other)
        Checks if the specified Geometrys overlap.
        Parameters:
        geometry - the first Geometry operand of the overlap test
        other - the second Geometry operand of the overlap test
        Returns:
        true iff the specified Geometrys spatially overlap
      • relates

        <P extends C2D> boolean relates​(Geometry<P> geometry,
                                        Geometry<P> other,
                                        String matrix)
        Checks if the specified Geometrys are spatially related by testing for intersections between the interior, boundary and exterior of the two geometric objects as specified by the values in the intersection pattern matrix. This returns false if all the tested intersections are empty except exterior (this) intersect exterior (another).
        Parameters:
        geometry - the first Geometry operand of the relates test
        other - the second Geometry operand of the relates test
        matrix - the intersection pattern matrix
        Returns:
        true iff this instance intersects the specifed other Geometry
      • distance

        <P extends C2D> double distance​(Geometry<P> geometry,
                                        Geometry<P> other)
        Calculates the shortest distance between any two points in the two Geometrys in the coordinate reference system of this Geometry. Only the X/Y-coordinates are used in the distance calculation; M- and Z-coordinates are ignored.
        Parameters:
        geometry - the first Geometry
        other - the second Geometry
        Returns:
        the shortest distance between the two specified Geometries
      • buffer

        <P extends C2DGeometry<P> buffer​(Geometry<P> geometry,
                                           double distance)
        Calculates a Geometry that represents all points whose distance from the specified Geometry is less than or equal the specified distance.

        Calculations are in the CoordinateReferenceSystem of this Geometry.

        Z- or M-coordinates are ignored in the buffering operation; and the result will always be a 2D geometry.

        Parameters:
        geometry - the Geometry for which to calculate the buffer
        distance - the buffer distance
        Returns:
        a 2D Geometry representing the buffer of the specified Geometry with the specified distance.
      • convexHull

        <P extends C2DGeometry<P> convexHull​(Geometry<P> geometry)
        Calculates the convex hull of the specified Geometry.
        Parameters:
        geometry - the Geometry for which to calculate the convex hull.
        Returns:
        the convex hull for the specified Geometry.
      • intersection

        <P extends C2DGeometry<P> intersection​(Geometry<P> geometry,
                                                 Geometry<P> other)
        Calculates the point set intersection of the specified Geometrys.
        Parameters:
        geometry - the first Geometry
        other - the second Geometry
        Returns:
        a Geometry representing the point set intersection between the two specified Geometries
      • union

        <P extends C2DGeometry<P> union​(Geometry<P> geometry,
                                          Geometry<P> other)
        Calculates the point set union of the specified Geometrys.
        Parameters:
        geometry - the first Geometry
        other - the second Geometry
        Returns:
        a Geometry representing the point set union between the two specified Geometries
      • difference

        <P extends C2DGeometry<P> difference​(Geometry<P> geometry,
                                               Geometry<P> other)
        Calculates the point set difference of the specified Geometrys.
        Parameters:
        geometry - the first Geometry
        other - the second Geometry
        Returns:
        a Geometry representing the point set difference between the two specified Geometries
      • symmetricDifference

        <P extends C2DGeometry<P> symmetricDifference​(Geometry<P> geometry,
                                                        Geometry<P> other)
        Calculates the point set symmetric difference of the specified Geometrys.
        Parameters:
        geometry - the first Geometry
        other - the second Geometry
        Returns:
        a Geometry representing the point set symmetric difference between the two specified Geometries
      • length

        <P extends C2D,​G extends Geometry<P> & Linear<P>> double length​(G geometry)
        Calculates the length of the specified Geometry.
        Parameters:
        geometry - the Geometry
        Returns:
        the length of the specified Geometry
      • area

        <P extends C2D,​G extends Geometry<P> & Polygonal<P>> double area​(G geometry)
        Calculates the area of the specified Geometry.
        Parameters:
        geometry - the Geometry
        Returns:
        the area of the specified Geometry
      • centroid

        <P extends C2D,​G extends Geometry<P> & Polygonal<P>> Point<P> centroid​(G geometry)
        Calculates a centroid for the specified Geometry.
        Type Parameters:
        G - Polygonal Geometry
        Parameters:
        geometry - the Geometry
        Returns:
        the centroid of the specified Geometry as a Point