Class Shape


  • public class Shape
    extends java.lang.Object
    This encapsulates the data necessary to define a shape for queries.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Shape.Point
      Defines a Point
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      java.lang.String getGeometry()  
      Shape.Point[] getPoints()  
      static Shape polygon​(Shape.Point... points)
      Specifies a polygon for a geospatial $geoWithin query on legacy coordinate pairs.
      com.mongodb.DBObject toDBObject()
      Creates a DBObject from this Shape
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait