Interface Geo


  • public interface Geo
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  Geo.Unit  
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static org.apache.tinkerpop.gremlin.process.traversal.P<Object> inside​(Point center, double radius)
      Finds whether an entity is inside the given circular area using a cartesian coordinate system.
      static org.apache.tinkerpop.gremlin.process.traversal.P<Object> inside​(Point center, double radius, Geo.Unit units)
      Finds whether an entity is inside the given circular area using a geo coordinate system.
      static org.apache.tinkerpop.gremlin.process.traversal.P<Object> inside​(Polygon polygon)
      Finds whether an entity is inside the given polygon.
      static LineString lineString​(double... coordinates)
      Creates a line string from the coordinates of its points.
      static LineString lineString​(Point point1, Point point2, Point... otherPoints)
      Creates a line string from the given (at least 2) points.
      static Point point​(double x, double y)
      Creates a point from the given coordinates.
      static Polygon polygon​(double... coordinates)
      Creates a polygon from the coordinates of its points.
      static Polygon polygon​(Point p1, Point p2, Point p3, Point... otherPoints)
      Creates a polygon from the given (at least 3) points.
    • Method Detail

      • inside

        static org.apache.tinkerpop.gremlin.process.traversal.P<Object> inside​(Point center,
                                                                               double radius,
                                                                               Geo.Unit units)
        Finds whether an entity is inside the given circular area using a geo coordinate system.
        Returns:
        a predicate to apply in a GraphTraversal.
      • inside

        static org.apache.tinkerpop.gremlin.process.traversal.P<Object> inside​(Point center,
                                                                               double radius)
        Finds whether an entity is inside the given circular area using a cartesian coordinate system.
        Returns:
        a predicate to apply in a GraphTraversal.
      • inside

        static org.apache.tinkerpop.gremlin.process.traversal.P<Object> inside​(Polygon polygon)
        Finds whether an entity is inside the given polygon.
        Returns:
        a predicate to apply in a GraphTraversal.
      • point

        @NonNull
        static Point point​(double x,
                           double y)
        Creates a point from the given coordinates.

        This is just a shortcut to Point.fromCoordinates(double, double). It is duplicated here so that Geo can be used as a single entry point in Gremlin-groovy scripts.

      • lineString

        @NonNull
        static LineString lineString​(@NonNull
                                     Point point1,
                                     @NonNull
                                     Point point2,
                                     @NonNull
                                     Point... otherPoints)
        Creates a line string from the given (at least 2) points.

        This is just a shortcut to LineString.fromPoints(Point, Point, Point...). It is duplicated here so that Geo can be used as a single entry point in Gremlin-groovy scripts.

      • lineString

        @NonNull
        static LineString lineString​(double... coordinates)
        Creates a line string from the coordinates of its points.

        This is provided for backward compatibility with previous DSE versions. We recommend lineString(Point, Point, Point...) instead.

      • polygon

        @NonNull
        static Polygon polygon​(double... coordinates)
        Creates a polygon from the coordinates of its points.

        This is provided for backward compatibility with previous DSE versions. We recommend polygon(Point, Point, Point, Point...) instead.