Class JtsSpatialAlgebra

  • All Implemented Interfaces:
    SpatialAlgebra

    public class JtsSpatialAlgebra
    extends Object
    implements SpatialAlgebra
    JTS-enabled implementation of spatial algebra, with full support for polygon-related geospatial functions
    • Constructor Summary

      Constructors 
      Constructor Description
      JtsSpatialAlgebra​(org.locationtech.spatial4j.context.jts.JtsSpatialContext context)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.locationtech.spatial4j.shape.Shape boundary​(org.locationtech.spatial4j.shape.Shape s)  
      org.locationtech.spatial4j.shape.Shape buffer​(org.locationtech.spatial4j.shape.Shape s, double distance)  
      org.locationtech.spatial4j.shape.Shape convexHull​(org.locationtech.spatial4j.shape.Shape s)  
      org.locationtech.spatial4j.shape.Shape difference​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean ehContains​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean ehCoveredBy​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean ehCovers​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean ehDisjoint​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean ehEquals​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean ehInside​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean ehMeet​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean ehOverlap​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      org.locationtech.spatial4j.shape.Shape envelope​(org.locationtech.spatial4j.shape.Shape s)  
      org.locationtech.spatial4j.shape.Shape intersection​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean rcc8dc​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean rcc8ec​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean rcc8eq​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean rcc8ntpp​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean rcc8ntppi​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean rcc8po​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean rcc8tpp​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean rcc8tppi​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean relate​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2, String intersectionPattern)  
      boolean sfContains​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean sfCrosses​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean sfDisjoint​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean sfEquals​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean sfIntersects​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean sfOverlaps​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean sfTouches​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      boolean sfWithin​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      org.locationtech.spatial4j.shape.Shape symDifference​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
      org.locationtech.spatial4j.shape.Shape union​(org.locationtech.spatial4j.shape.Shape s1, org.locationtech.spatial4j.shape.Shape s2)  
    • Constructor Detail

      • JtsSpatialAlgebra

        public JtsSpatialAlgebra​(org.locationtech.spatial4j.context.jts.JtsSpatialContext context)
    • Method Detail

      • buffer

        public org.locationtech.spatial4j.shape.Shape buffer​(org.locationtech.spatial4j.shape.Shape s,
                                                             double distance)
        Specified by:
        buffer in interface SpatialAlgebra
      • convexHull

        public org.locationtech.spatial4j.shape.Shape convexHull​(org.locationtech.spatial4j.shape.Shape s)
        Specified by:
        convexHull in interface SpatialAlgebra
      • boundary

        public org.locationtech.spatial4j.shape.Shape boundary​(org.locationtech.spatial4j.shape.Shape s)
        Specified by:
        boundary in interface SpatialAlgebra
      • envelope

        public org.locationtech.spatial4j.shape.Shape envelope​(org.locationtech.spatial4j.shape.Shape s)
        Specified by:
        envelope in interface SpatialAlgebra
      • union

        public org.locationtech.spatial4j.shape.Shape union​(org.locationtech.spatial4j.shape.Shape s1,
                                                            org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        union in interface SpatialAlgebra
      • intersection

        public org.locationtech.spatial4j.shape.Shape intersection​(org.locationtech.spatial4j.shape.Shape s1,
                                                                   org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        intersection in interface SpatialAlgebra
      • symDifference

        public org.locationtech.spatial4j.shape.Shape symDifference​(org.locationtech.spatial4j.shape.Shape s1,
                                                                    org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        symDifference in interface SpatialAlgebra
      • difference

        public org.locationtech.spatial4j.shape.Shape difference​(org.locationtech.spatial4j.shape.Shape s1,
                                                                 org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        difference in interface SpatialAlgebra
      • relate

        public boolean relate​(org.locationtech.spatial4j.shape.Shape s1,
                              org.locationtech.spatial4j.shape.Shape s2,
                              String intersectionPattern)
        Specified by:
        relate in interface SpatialAlgebra
      • sfEquals

        public boolean sfEquals​(org.locationtech.spatial4j.shape.Shape s1,
                                org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        sfEquals in interface SpatialAlgebra
      • sfDisjoint

        public boolean sfDisjoint​(org.locationtech.spatial4j.shape.Shape s1,
                                  org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        sfDisjoint in interface SpatialAlgebra
      • sfIntersects

        public boolean sfIntersects​(org.locationtech.spatial4j.shape.Shape s1,
                                    org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        sfIntersects in interface SpatialAlgebra
      • sfTouches

        public boolean sfTouches​(org.locationtech.spatial4j.shape.Shape s1,
                                 org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        sfTouches in interface SpatialAlgebra
      • sfCrosses

        public boolean sfCrosses​(org.locationtech.spatial4j.shape.Shape s1,
                                 org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        sfCrosses in interface SpatialAlgebra
      • sfWithin

        public boolean sfWithin​(org.locationtech.spatial4j.shape.Shape s1,
                                org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        sfWithin in interface SpatialAlgebra
      • sfContains

        public boolean sfContains​(org.locationtech.spatial4j.shape.Shape s1,
                                  org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        sfContains in interface SpatialAlgebra
      • sfOverlaps

        public boolean sfOverlaps​(org.locationtech.spatial4j.shape.Shape s1,
                                  org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        sfOverlaps in interface SpatialAlgebra
      • ehEquals

        public boolean ehEquals​(org.locationtech.spatial4j.shape.Shape s1,
                                org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        ehEquals in interface SpatialAlgebra
      • ehDisjoint

        public boolean ehDisjoint​(org.locationtech.spatial4j.shape.Shape s1,
                                  org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        ehDisjoint in interface SpatialAlgebra
      • ehMeet

        public boolean ehMeet​(org.locationtech.spatial4j.shape.Shape s1,
                              org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        ehMeet in interface SpatialAlgebra
      • ehOverlap

        public boolean ehOverlap​(org.locationtech.spatial4j.shape.Shape s1,
                                 org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        ehOverlap in interface SpatialAlgebra
      • ehCovers

        public boolean ehCovers​(org.locationtech.spatial4j.shape.Shape s1,
                                org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        ehCovers in interface SpatialAlgebra
      • ehCoveredBy

        public boolean ehCoveredBy​(org.locationtech.spatial4j.shape.Shape s1,
                                   org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        ehCoveredBy in interface SpatialAlgebra
      • ehInside

        public boolean ehInside​(org.locationtech.spatial4j.shape.Shape s1,
                                org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        ehInside in interface SpatialAlgebra
      • ehContains

        public boolean ehContains​(org.locationtech.spatial4j.shape.Shape s1,
                                  org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        ehContains in interface SpatialAlgebra
      • rcc8dc

        public boolean rcc8dc​(org.locationtech.spatial4j.shape.Shape s1,
                              org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        rcc8dc in interface SpatialAlgebra
      • rcc8ec

        public boolean rcc8ec​(org.locationtech.spatial4j.shape.Shape s1,
                              org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        rcc8ec in interface SpatialAlgebra
      • rcc8po

        public boolean rcc8po​(org.locationtech.spatial4j.shape.Shape s1,
                              org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        rcc8po in interface SpatialAlgebra
      • rcc8tppi

        public boolean rcc8tppi​(org.locationtech.spatial4j.shape.Shape s1,
                                org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        rcc8tppi in interface SpatialAlgebra
      • rcc8tpp

        public boolean rcc8tpp​(org.locationtech.spatial4j.shape.Shape s1,
                               org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        rcc8tpp in interface SpatialAlgebra
      • rcc8ntpp

        public boolean rcc8ntpp​(org.locationtech.spatial4j.shape.Shape s1,
                                org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        rcc8ntpp in interface SpatialAlgebra
      • rcc8ntppi

        public boolean rcc8ntppi​(org.locationtech.spatial4j.shape.Shape s1,
                                 org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        rcc8ntppi in interface SpatialAlgebra
      • rcc8eq

        public boolean rcc8eq​(org.locationtech.spatial4j.shape.Shape s1,
                              org.locationtech.spatial4j.shape.Shape s2)
        Specified by:
        rcc8eq in interface SpatialAlgebra