Class GeoP
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.P<Geometry>
org.apache.tinkerpop.gremlin.process.traversal.GeoP
- All Implemented Interfaces:
Serializable,Cloneable,Predicate<Geometry>
Predefined
Predicate values that filter Geometry values by a spatial
relationship, backed by the Geo predicates.
An argument may instead come from a child traversal, which is resolved against each traverser.
An argument may also be a GValue, whose value is resolved when the traversal is built.
Accuracy in the geographic model. Shapes are related in longitude and latitude, with edges straight in both, so the predicates hold for edges under about 100 km that cross neither the antimeridian nor a pole.
- Since:
- 4.0.0
- See Also:
-
Field Summary
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.P
biPredicate, literals, variables -
Constructor Summary
ConstructorsConstructorDescriptionGeoP(PBiPredicate<Object, Object> biPredicate, Object value) Constructs aGeoPfrom the given geometry, which is validated as a constant.GeoP(PBiPredicate<Object, Object> biPredicate, GValue<?> value) Constructs aGeoPfrom a variable, whose value is validated once it is resolved.GeoP(PBiPredicate<Object, Object> biPredicate, Traversal.Admin<?, ?> traversalValue) Constructs aGeoPwith a child traversal whose result is resolved at runtime against the current traverser. -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanstatic GeoPgeoContains(GValue<Geometry> value) Determines if a geometry entirely contains the geometry a variable holds.static GeoPgeoContains(Traversal<?, ?> traversalValue) Determines if a geometry entirely contains the geometry resolved from a child traversal at runtime.static GeoPgeoContains(Geometry value) Determines if a geometry entirely contains the given geometry.static GeoPDetermines if a geometry lies entirely inside the geometry a variable holds.static GeoPDetermines if a geometry lies entirely inside the geometry resolved from a child traversal at runtime.static GeoPDetermines if a geometry lies entirely inside the given geometry.negate()voidupdateVariable(String name, Object value) protected voidvalidateValue(Object value) Checks a value beforeP.setValue(Object)replaces the predicate's value state with it, so that a subclass can reject a value it cannot hold.Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.P
and, between, between, collectTraversals, eq, eq, eq, getBiPredicate, getChildTraversals, getGValues, getPredicateName, getValue, gt, gt, gt, gte, gte, gte, hashCode, hasTraversal, inside, inside, isParameterized, isResolvedEmpty, lt, lt, lt, lte, lte, lte, neq, neq, neq, not, or, outside, outside, resolve, setValue, test, test, toString, typeOf, typeOf, typeOf, within, within, within, within, within, without, without, without, without, without
-
Constructor Details
-
GeoP
Constructs aGeoPfrom the given geometry, which is validated as a constant. A geometry resolved at runtime is given as a child traversal instead.- Since:
- 4.0.0
-
GeoP
Constructs aGeoPwith a child traversal whose result is resolved at runtime against the current traverser.- Since:
- 4.0.0
-
GeoP
Constructs aGeoPfrom a variable, whose value is validated once it is resolved.- Since:
- 4.0.0
-
-
Method Details
-
equals
-
negate
-
clone
-
updateVariable
A new value for one of this predicate's variables is validated as the same value given to a constructor would be, before it is kept.
- Overrides:
updateVariablein classP<Geometry>
-
validateValue
Checks a value beforeP.setValue(Object)replaces the predicate's value state with it, so that a subclass can reject a value it cannot hold. It accepts every value by default. The value is typed as anObjectbecausesetValueis also given child traversals, including by the constructors.A value other than a child traversal is validated as the same value given to a constructor would be.
- Overrides:
validateValuein classP<Geometry>
-
geoWithin
Determines if a geometry lies entirely inside the given geometry. A value that lies only on the given geometry's boundary is not within it.- Since:
- 4.0.0
-
geoWithin
Determines if a geometry lies entirely inside the geometry a variable holds.- Since:
- 4.0.0
-
geoWithin
Determines if a geometry lies entirely inside the geometry resolved from a child traversal at runtime.- Since:
- 4.0.0
-
geoContains
Determines if a geometry entirely contains the given geometry. A geometry does not contain a value that lies only on its boundary.- Since:
- 4.0.0
-
geoContains
Determines if a geometry entirely contains the geometry a variable holds.- Since:
- 4.0.0
-
geoContains
Determines if a geometry entirely contains the geometry resolved from a child traversal at runtime.- Since:
- 4.0.0
-