Class FastPolygonOperations

  • All Implemented Interfaces:
    Serializable

    public class FastPolygonOperations
    extends Object
    implements Serializable
    A class for faster geometry operations which use a common polygon as one of their input.

    Similar to JTS' PreparedGeometry construct, but implements also further operations (including non-boolean ones like Geometry.intersection(Geometry)).

    The main speed-up is achieved by splitting the common polygon into smaller chunks with a "limited" number of vertices, so that operations working on "small" input geometries can skip many vertices of the original polygon.

    See Also:
    Serialized Form
    • Constructor Detail

      • FastPolygonOperations

        public FastPolygonOperations​(P geom)
        Constructor using a given geometry geom and geometry type P.
        Type Parameters:
        P - geometry type
        Parameters:
        geom - geometry object
    • Method Detail

      • intersection

        public org.locationtech.jts.geom.Geometry intersection​(org.locationtech.jts.geom.Geometry other)
        Calculates the intersection with another Geometry.
        Parameters:
        other - an arbitrary Geometry to intersect
        Returns:
        the intersection of this polygon with the other Geometry