You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Geospatial data can now be stored and queried using vCore-based Azure Cosmos DB for MongoDB. This enhancement provides powerful tools to manage and analyse spatial data, enabling a wide range of applications such as real-time location tracking, route optimization, and spatial analytics.
18
+
Geospatial data can now be stored and queried using vCore-based Azure Cosmos DB for MongoDB. This enhancement provides powerful tools to manage and analyze spatial data, enabling a wide range of applications such as real-time location tracking, route optimization, and spatial analytics.
19
19
20
20
Here’s a quick overview of the geospatial commands and operators now supported:
21
21
@@ -54,7 +54,7 @@ Selects documents with geospatial data that exists entirely within a specified s
54
54
```
55
55
56
56
### **$box**
57
-
Defines a rectangular area using two coordinate pairs (bottom-left and top-right corners). Used with the `$geoWithin` operator to find documents within this rectangle. Eg. finding all locations within a rectangular region on a map.
57
+
Defines a rectangular area using two coordinate pairs (bottom-left and top-right corners). Used with the `$geoWithin` operator to find documents within this rectangle. For example, finding all locations within a rectangular region on a map.
58
58
59
59
```json
60
60
db.collection.find({
@@ -109,7 +109,7 @@ Specifies a GeoJSON object to define a geometry. Used with geospatial operators
109
109
```
110
110
111
111
### **$maxDistance**
112
-
Specifies the maximum distance from a point for a geospatial query. Used with `$near` and `$nearSphere` operators. Eg. finding all locations within 2 km of a given point.
112
+
Specifies the maximum distance from a point for a geospatial query. Used with `$near` and `$nearSphere` operators. For example, finding all locations within 2 km of a given point.
113
113
114
114
```json
115
115
db.collection.find({
@@ -159,7 +159,7 @@ Defines a polygon using an array of coordinate pairs. Used with the `$geoWithin`
159
159
```
160
160
161
161
### **$near**
162
-
Finds documents that are near a specified point. Returns documents sorted by distance from the point. Eg. Finding the nearest restaurants to a user's location.
162
+
Finds documents that are near a specified point. Returns documents sorted by distance from the point. For example, finding the nearest restaurants to a user's location.
163
163
164
164
```json
165
165
db.collection.find({
@@ -217,26 +217,26 @@ Performs a geospatial query to return documents sorted by distance from a specif
217
217
## Considerations and Unsupported Capabilities
218
218
219
219
220
-
* Currently, querying with a single-ringed GeoJSON polygon whose area exceeds a single hemisphere is not supported. In such cases, Mongo vCore will return the following error message:
220
+
* Currently, querying with a single-ringed GeoJSON polygon whose area exceeds a single hemisphere isn't supported. In such cases, Mongo vCore returns the following error message:
221
221
```json
222
222
Error: Custom CRS for big polygon is not supported yet.
223
223
```
224
-
* A composite index using a regular index and geospatial index is not allowed. Eg.
224
+
* A composite index using a regular index and geospatial index isn't allowed. For example:
225
225
```json
226
226
db.collection.createIndex({a: "2d", b: 1});
227
227
Error: Compound 2d indexes are not supported yet
228
228
```
229
-
* Polygons with holes are currently not supported for use with $geoWithin queries. Although inserting a polygon with holes is not restricted, but it will eventually fail with the following error message:
229
+
* Polygons with holes are currently not supported for use with $geoWithin queries. Although inserting a polygon with holes is not restricted, it eventually fails with the following error message:
230
230
231
231
```json
232
232
Error: $geoWithin currently doesn't support polygons with holes
233
233
```
234
-
* The key field is always required in the $geoNear aggregation stage. If the key field is missing, the following error will occur:
234
+
* The key field is always required in the $geoNear aggregation stage. If the key field is missing, the following error occurs:
235
235
236
236
```json
237
237
Error: $geoNear requires a 'key' option as a String
238
238
```
239
-
* The `$geoNear`, `$near`, and `$nearSphere` stages do not have strict index requirements, so these queries would not fail if an index is missing.
239
+
* The `$geoNear`, `$near`, and `$nearSphere` stages don't have strict index requirements, so these queries wouldn't fail if an index is missing.
0 commit comments