Class GeometryFunctions

  • public class GeometryFunctions
    extends Object
    A set of static functions providing the implementation of processes exposed by the GeometryProcessFactory.
    Andrea Aime
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double area​(Geometry geom)  
      static Geometry boundary​(Geometry geom)  
      static Geometry buffer​(Geometry geom, double distance, Integer quadrantSegments, GeometryFunctions.BufferCapStyle capStyle)  
      static Geometry centroid​(Geometry geom)  
      static boolean contains​(Geometry a, Geometry b)  
      static Geometry convexHull​(Geometry geom)  
      static boolean crosses​(Geometry a, Geometry b)  
      static Geometry densify​(Geometry geom, double distance)  
      static Geometry difference​(Geometry a, Geometry b)  
      static int dimension​(Geometry geom)  
      static boolean disjoint​(Geometry a, Geometry b)  
      static double distance​(Geometry a, Geometry b)  
      static Point endPoint​(LineString line)  
      static Geometry envelope​(Geometry geom)  
      static boolean equalsExact​(Geometry a, Geometry b)  
      static boolean equalsExactTolerance​(Geometry a, Geometry b, double tolerance)  
      static Geometry exteriorRing​(Polygon polygon)  
      static String geometryType​(Geometry geom)  
      static Geometry getGeometryN​(GeometryCollection collection, int index)  
      static double getX​(Point point)  
      static double getY​(Point point)  
      static Geometry interiorPoint​(Geometry geom)  
      static Geometry interiorRingN​(Polygon polygon, int index)  
      static Geometry intersection​(Geometry a, Geometry b)  
      static boolean intersects​(Geometry a, Geometry b)  
      static boolean isClosed​(LineString line)  
      static boolean isEmpty​(Geometry geom)  
      static boolean isRing​(LineString line)  
      static boolean isSimple​(Geometry geom)  
      static boolean isValid​(Geometry geom)  
      static boolean isWithinDistance​(Geometry a, Geometry b, double distance)  
      static double length​(Geometry geom)  
      static int numGeometries​(Geometry collection)  
      static int numInteriorRing​(Polygon polygon)  
      static int numPoints​(Geometry geom)  
      static boolean overlaps​(Geometry a, Geometry b)  
      static Point pointN​(LineString line, int index)  
      static Geometry polygonize​(Geometry geom)  
      static String relate​(Geometry a, Geometry b)  
      static boolean relatePattern​(Geometry a, Geometry b, String pattern)  
      static Geometry reproject​(Geometry geometry, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS)
      Will reproject a geometry to another CRS.
      static Geometry simplify​(Geometry geom, double distance)  
      static Geometry splitPolygon​(Geometry polygon, LineString line)  
      static Point startPoint​(LineString line)  
      static Geometry symDifference​(Geometry a, Geometry b)  
      static boolean touches​(Geometry a, Geometry b)  
      static Geometry union​(Geometry... geoms)  
      static boolean within​(Geometry a, Geometry b)  
      • Methods inherited from class Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GeometryFunctions

        public GeometryFunctions()
    • Method Detail

      • contains

        public static boolean contains​(Geometry a,
                                       Geometry b)
      • isEmpty

        public static boolean isEmpty​(Geometry geom)
      • length

        public static double length​(Geometry geom)
      • intersects

        public static boolean intersects​(Geometry a,
                                         Geometry b)
      • isValid

        public static boolean isValid​(Geometry geom)
      • geometryType

        public static String geometryType​(Geometry geom)
      • numPoints

        public static int numPoints​(Geometry geom)
      • isSimple

        public static boolean isSimple​(Geometry geom)
      • distance

        public static double distance​(Geometry a,
                                      Geometry b)
      • isWithinDistance

        public static boolean isWithinDistance​(Geometry a,
                                               Geometry b,
                                               double distance)
      • area

        public static double area​(Geometry geom)
      • centroid

        public static Geometry centroid​(Geometry geom)
      • interiorPoint

        public static Geometry interiorPoint​(Geometry geom)
      • dimension

        public static int dimension​(Geometry geom)
      • boundary

        public static Geometry boundary​(Geometry geom)
      • envelope

        public static Geometry envelope​(Geometry geom)
      • disjoint

        public static boolean disjoint​(Geometry a,
                                       Geometry b)
      • touches

        public static boolean touches​(Geometry a,
                                      Geometry b)
      • crosses

        public static boolean crosses​(Geometry a,
                                      Geometry b)
      • within

        public static boolean within​(Geometry a,
                                     Geometry b)
      • overlaps

        public static boolean overlaps​(Geometry a,
                                       Geometry b)
      • relatePattern

        public static boolean relatePattern​(Geometry a,
                                            Geometry b,
                                            String pattern)
      • relate

        public static String relate​(Geometry a,
                                    Geometry b)
      • buffer

        public static Geometry buffer​(Geometry geom,
                                      double distance,
                                      Integer quadrantSegments,
                                      GeometryFunctions.BufferCapStyle capStyle)
      • convexHull

        public static Geometry convexHull​(Geometry geom)
      • intersection

        public static Geometry intersection​(Geometry a,
                                            Geometry b)
      • union

        public static Geometry union​(Geometry... geoms)
      • difference

        public static Geometry difference​(Geometry a,
                                          Geometry b)
      • symDifference

        public static Geometry symDifference​(Geometry a,
                                             Geometry b)
      • equalsExactTolerance

        public static boolean equalsExactTolerance​(Geometry a,
                                                   Geometry b,
                                                   double tolerance)
      • equalsExact

        public static boolean equalsExact​(Geometry a,
                                          Geometry b)
      • numGeometries

        public static int numGeometries​(Geometry collection)
      • getGeometryN

        public static Geometry getGeometryN​(GeometryCollection collection,
                                            int index)
      • getX

        public static double getX​(Point point)
      • getY

        public static double getY​(Point point)
      • isClosed

        public static boolean isClosed​(LineString line)
      • pointN

        public static Point pointN​(LineString line,
                                   int index)
      • startPoint

        public static Point startPoint​(LineString line)
      • endPoint

        public static Point endPoint​(LineString line)
      • isRing

        public static boolean isRing​(LineString line)
      • exteriorRing

        public static Geometry exteriorRing​(Polygon polygon)
      • numInteriorRing

        public static int numInteriorRing​(Polygon polygon)
      • interiorRingN

        public static Geometry interiorRingN​(Polygon polygon,
                                             int index)
      • simplify

        public static Geometry simplify​(Geometry geom,
                                        double distance)
      • densify

        public static Geometry densify​(Geometry geom,
                                       double distance)
      • polygonize

        public static Geometry polygonize​(Geometry geom)
      • splitPolygon

        public static Geometry splitPolygon​(Geometry polygon,
                                            LineString line)