public class Shape extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Shape.Point
Defines a Point
|
| Modifier and Type | Method and Description |
|---|---|
static Shape |
box(Shape.Point bottomLeft,
Shape.Point upperRight)
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(Shape.Point center,
double radius)
Specifies a circle for a $geoWithin query.
|
static Shape |
centerSphere(Shape.Point center,
double radius)
Specifies a circle for a geospatial query that uses spherical geometry.
|
String |
getGeometry() |
Shape.Point[] |
getPoints() |
static Shape |
polygon(Shape.Point... points)
Specifies a polygon for a geospatial $geoWithin query on legacy coordinate pairs.
|
DBObject |
toDBObject()
Creates a DBObject from this Shape
|
public static Shape box(Shape.Point bottomLeft, Shape.Point upperRight)
bottomLeft - the bottom left boundupperRight - the upper right boundpublic static Shape center(Shape.Point center, double radius)
center - the center of the circleradius - the radius circlepublic static Shape centerSphere(Shape.Point center, double radius)
center - the center of the circleradius - the radius circlepublic static Shape polygon(Shape.Point... points)
points - the points of the polygonpublic String getGeometry()
public Shape.Point[] getPoints()
public DBObject toDBObject()