Interface GeoShape

All Superinterfaces:
Serializable, Shape
All Known Implementing Classes:
BoxShape, RadiusShape

public interface GeoShape extends 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
    Create a shape used as predicate for geo queries from a radius around the query center point.
    The metric used for this geo predicate.
  • Method Details

    • byRadius

      static GeoShape byRadius(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

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