Interface GeoShape
- All Superinterfaces:
Serializable,Shape
- All Known Implementing Classes:
BoxShape,RadiusShape
Search predicate for
GEOSEARCH and GEOSEARCHSTORE commands.- Since:
- 2.6
-
Method Summary
Modifier and TypeMethodDescriptionstatic GeoShapebyBox(double width, double height, RedisGeoCommands.DistanceUnit distanceUnit) Create a shape used as predicate for geo queries from a bounding box with specified bywidthandheight.static GeoShapebyBox(BoundingBox boundingBox) Create a shape used as predicate for geo queries from aBoundingBox.static GeoShapeCreate a shape used as predicate for geo queries from aradiusaround the query center point.The metric used for this geo predicate.
-
Method Details
-
byRadius
Create a shape used as predicate for geo queries from aradiusaround the query center point.- Parameters:
radius-- Returns:
-
byBox
Create a shape used as predicate for geo queries from a bounding box with specified bywidthandheight.- Parameters:
width- must not be null.height- must not be null.distanceUnit- must not be null.- Returns:
-
byBox
Create a shape used as predicate for geo queries from aBoundingBox.- Parameters:
boundingBox- must not be null.- Returns:
-
getMetric
Metric getMetric()The metric used for this geo predicate.- Returns:
-