@@ -153,53 +153,3 @@ containing the term `coffee`:
153153text(" abstract" , " coffee" )
154154```
155155
156- ### Geospatial
157-
158- The geospatial operator methods include:
159-
160- - `geoWithin`: Selects all documents containing a field whose value is a GeoJSON geometry that falls within within a bounding GeoJSON
161- geometry.
162- - `geoWithinBox`: Selects all documents containing a field with grid coordinates data that exist entirely within the specified box.
163- - `geoWithinPolygon`: Selects all documents containing a field with grid coordinates data that exist entirely within the specified polygon.
164- - `geoWithinCenter`: Selects all documents containing a field with grid coordinates data that exist entirely within the specified circle.
165- - `geoWithinCenterSphere`: Selects geometries containing a field with geospatial data (GeoJSON or legacy coordinate pairs) that exist
166- entirely within the specified circle, using spherical geometry.
167- - `geoIntersects`: Selects geometries that intersect with a GeoJSON geometry. The 2dsphere index supports $geoIntersects.
168- - `near`: Returns geospatial objects in proximity to a point. Requires a geospatial index. The 2dsphere and 2d indexes support $near.
169- - `nearSphere`: Returns geospatial objects in proximity to a point on a sphere. Requires a geospatial index. The 2dsphere and 2d
170- indexes support $nearSphere.
171-
172- To make it easier to construct GeoJSON - based filters, the driver also include a full GeoJSON class hierarchy :
173-
174- - [`Point`]({{< apiref " com/mongodb/client/model/geojson/Point" > }}): A representation of a GeoJSON Point .
175- - [`MultiPoint `]({{< apiref " com/mongodb/client/model/geojson/MultiPoint" > }}): A representation of a GeoJSON MultiPoint .
176- - [`LineString `]({{< apiref " com/mongodb/client/model/geojson/LineString" > }}): A representation of a GeoJSON LineString .
177- - [`MultiLineString `]({{< apiref " com/mongodb/client/model/geojson/MultiLineString" > }}): A representation of a GeoJSON MultiLineString .
178- - [`Polygon `]({{< apiref " com/mongodb/client/model/geojson/Polygon" > }}): A representation of a GeoJSON Polygon .
179- - [`MultiPolygon `]({{< apiref " com/mongodb/client/model/geojson/MultiPolygon" > }}): A representation of a GeoJSON MultiPolygon .
180- - [`GeometryCollection `]({{< apiref " com/mongodb/client/model/geojson/GeometryCollection" > }}): A representation of a GeoJSON
181- GeometryCollection .
182-
183-
184- #### Examples
185-
186- This example creates a filter that selects all documents where the `geo` field contains a GeoJSON Geometry object that falls within the
187- given polygon:
188-
189- ```java
190- Polygon polygon = new Polygon (Arrays . asList(new Position (0 , 0 ),
191- new Position (4 , 0 ),
192- new Position (4 , 4 ),
193- new Position (0 , 4 ),
194- new Position (0 , 0 )));
195- geoWithin(' geo' , polygon))
196- ```
197-
198- Similarly, this example creates a filter that selects all documents where the ` geo ` field contains a GeoJSON Geometry object that
199- intersects the given Point:
200-
201- ``` java
202- geoIntersects(' geo' , new Point (new Position (4 , 0 )))
203- ```
204-
205-
0 commit comments