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 GeoShape
byBox
(double width, double height, RedisGeoCommands.DistanceUnit distanceUnit) Create a shape used as predicate for geo queries from a bounding box with specified bywidth
andheight
.static GeoShape
byBox
(BoundingBox boundingBox) Create a shape used as predicate for geo queries from aBoundingBox
.static GeoShape
Create a shape used as predicate for geo queries from aradius
around the query center point.The metric used for this geo predicate.
-
Method Details
-
byRadius
Create a shape used as predicate for geo queries from aradius
around the query center point.- Parameters:
radius
-- Returns:
-
byBox
Create a shape used as predicate for geo queries from a bounding box with specified bywidth
andheight
.- 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:
-