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 Type
    Method
    Description
    static GeoShape
    byBox(double width, double height, RedisGeoCommands.DistanceUnit distanceUnit)
    Create a shape used as predicate for geo queries from a bounding box with specified by width and height.
    static GeoShape
    byBox(BoundingBox boundingBox)
    Create a shape used as predicate for geo queries from a BoundingBox.
    static GeoShape
    byRadius(org.springframework.data.geo.Distance radius)
    Create a shape used as predicate for geo queries from a radius around the query center point.
    org.springframework.data.geo.Metric
    The metric used for this geo predicate.
  • Method Details

    • byRadius

      static GeoShape byRadius(org.springframework.data.geo.Distance radius)
      Create a shape used as predicate for geo queries from a radius around the query center point.
      Parameters:
      radius -
      Returns:
    • byBox

      static GeoShape byBox(double width, double height, RedisGeoCommands.DistanceUnit distanceUnit)
      Create a shape used as predicate for geo queries from a bounding box with specified by width and height.
      Parameters:
      width - must not be null.
      height - must not be null.
      distanceUnit - must not be null.
      Returns:
    • byBox

      static GeoShape byBox(BoundingBox boundingBox)
      Create a shape used as predicate for geo queries from a BoundingBox.
      Parameters:
      boundingBox - must not be null.
      Returns:
    • getMetric

      org.springframework.data.geo.Metric getMetric()
      The metric used for this geo predicate.
      Returns: