Class Shape

  • Direct Known Subclasses:
    Shape.Center

    @Deprecated(since="2.0",
                forRemoval=true)
    public class Shape
    extends Object
    Deprecated, for removal: This API element is subject to removal in a future version.
    use the driver provide facilities instead.
    This encapsulates the data necessary to define a shape for queries.
    See Also:
    Filters
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Shape.Center
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static Shape box​(Point bottomLeft, Point upperRight)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specifies a rectangle for a geospatial $geoWithin query to return documents that are within the bounds of the rectangle, according to their point-based location data.
      static Shape center​(Point center, double radius)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specifies a circle for a $geoWithin query.
      static Shape centerSphere​(Point center, double radius)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specifies a circle for a geospatial query that uses spherical geometry.
      String getGeometry()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      Point[] getPoints()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      static Shape polygon​(Point... points)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specifies a polygon for a geospatial $geoWithin query on legacy coordinate pairs.
    • Method Detail

      • box

        public static Shape box​(Point bottomLeft,
                                Point upperRight)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specifies a rectangle for a geospatial $geoWithin query to return documents that are within the bounds of the rectangle, according to their point-based location data.
        Parameters:
        bottomLeft - the bottom left bound
        upperRight - the upper right bound
        Returns:
        the box
        MongoDB documentation
        $box
        $geoWithin
      • center

        public static Shape center​(Point center,
                                   double radius)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specifies a circle for a $geoWithin query.
        Parameters:
        center - the center of the circle
        radius - the radius circle
        Returns:
        the box
        MongoDB documentation
        $center
        $geoWithin
      • centerSphere

        public static Shape centerSphere​(Point center,
                                         double radius)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specifies a circle for a geospatial query that uses spherical geometry.
        Parameters:
        center - the center of the circle
        radius - the radius circle
        Returns:
        the box
        MongoDB documentation
        $centerSphere
      • polygon

        public static Shape polygon​(Point... points)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specifies a polygon for a geospatial $geoWithin query on legacy coordinate pairs.
        Parameters:
        points - the points of the polygon
        Returns:
        the box
        MongoDB documentation
        $polygon
        $geoWithin
      • getGeometry

        public String getGeometry()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns:
        the geometry of the shape
      • getPoints

        public Point[] getPoints()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns:
        the points of the shape