Skip to content

Commit db256c2

Browse files
Update geospatial-support.md
1 parent b6d40a0 commit db256c2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

articles/cosmos-db/mongodb/vcore/geospatial-support.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.date: 07/31/2024
1515

1616
[!INCLUDE[MongoDB (vCore)](~/reusable-content/ce-skilling/azure/includes/cosmos-db/includes/appliesto-mongodb-vcore.md)]
1717

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 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.
1919

2020
Here’s a quick overview of the geospatial commands and operators now supported:
2121

@@ -54,7 +54,7 @@ Selects documents with geospatial data that exists entirely within a specified s
5454
```
5555

5656
### **$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.
5858

5959
```json
6060
db.collection.find({
@@ -109,7 +109,7 @@ Specifies a GeoJSON object to define a geometry. Used with geospatial operators
109109
```
110110

111111
### **$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.
113113

114114
```json
115115
db.collection.find({
@@ -159,7 +159,7 @@ Defines a polygon using an array of coordinate pairs. Used with the `$geoWithin`
159159
```
160160

161161
### **$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.
163163

164164
```json
165165
db.collection.find({
@@ -217,26 +217,26 @@ Performs a geospatial query to return documents sorted by distance from a specif
217217
## Considerations and Unsupported Capabilities
218218

219219

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:
221221
```json
222222
Error: Custom CRS for big polygon is not supported yet.
223223
```
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:
225225
```json
226226
db.collection.createIndex({a: "2d", b: 1});
227227
Error: Compound 2d indexes are not supported yet
228228
```
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:
230230

231231
```json
232232
Error: $geoWithin currently doesn't support polygons with holes
233233
```
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:
235235

236236
```json
237237
Error: $geoNear requires a 'key' option as a String
238238
```
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.
240240

241241
## Related content
242242

0 commit comments

Comments
 (0)