Interface GeoShape
- All Superinterfaces:
Serializable
,org.springframework.data.geo.Shape
- All Known Implementing Classes:
BoxShape
,RadiusShape
public interface GeoShape
extends org.springframework.data.geo.Shape
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
byRadius
(org.springframework.data.geo.Distance radius) Create a shape used as predicate for geo queries from aradius
around the query center point.org.springframework.data.geo.Metric
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
org.springframework.data.geo.Metric getMetric()The metric used for this geo predicate.- Returns:
-