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
Copy file name to clipboardExpand all lines: articles/cosmos-db/sql-query-geospatial-index.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Index spatial data with Azure Cosmos DB
4
4
author: timsander1
5
5
ms.service: cosmos-db
6
6
ms.topic: conceptual
7
-
ms.date: 02/20/2020
7
+
ms.date: 05/03/2020
8
8
ms.author: tisande
9
9
10
10
---
@@ -23,11 +23,17 @@ If you specify an indexing policy that includes spatial index for /* (all paths)
23
23
24
24
## Modifying geospatial data type
25
25
26
-
In your container, the `geospatialConfig`specifies how the geospatial data will be indexed. You should specify one `geospatialConfig`per container: geography or geometry. If not specified, the `geospatialConfig` will default to the geography data type. When you modify the `geospatialConfig`, all existing geospatial data in the container will be reindexed.
26
+
In your container, the **Geospatial Configuration**specifies how the spatial data will be indexed. Specify one **Geospatial Configuration**per container: geography or geometry.
27
27
28
-
> [!NOTE]
29
-
> Azure Cosmos DB currently supports modifications to the geospatialConfig in the .NET SDK only in versions 3.6 and above.
30
-
>
28
+
You can toggle between the **geography** and **geometry** spatial type in the Azure portal. It's important that you create a [valid spatial geometry indexing policy with a bounding box](#geometry-data-indexing-examples) before switching to the geometry spatial type.
29
+
30
+
Here's how to set the **Geospatial Configuration** in **Data Explorer** within the Azure portal:
You can also modify the `geospatialConfig` in the .NET SDK to adjust the **Geospatial Configuration**:
35
+
36
+
If not specified, the `geospatialConfig` will default to the geography data type. When you modify the `geospatialConfig`, all existing geospatial data in the container will be reindexed.
31
37
32
38
Here is an example for modifying the geospatial data type to `geometry` by setting the `geospatialConfig` property and adding a **boundingBox**:
33
39
@@ -107,7 +113,7 @@ The bounding box consists of the following properties:
107
113
108
114
A bounding box is required because geometric data occupies a plane that can be infinite. Spatial indexes, however, require a finite space. For the **geography** data type, the Earth is the boundary and you do not need to set a bounding box.
109
115
110
-
You should create a bounding box that contains all (or most) of your data. Only operations computed on the objects that are entirely inside the bounding box will be able to utilize the spatial index. You should not make the bounding box significantly larger than necessary because this will negatively impact query performance.
116
+
Create a bounding box that contains all (or most) of your data. Only operations computed on the objects that are entirely inside the bounding box will be able to utilize the spatial index. Making the bounding box larger than necessary will negatively impact query performance.
111
117
112
118
Here is an example indexing policy that indexes **geometry** data with **geospatialConfig** set to `geometry`:
113
119
@@ -157,4 +163,4 @@ Now that you have learned how to get started with geospatial support in Azure Co
157
163
158
164
* Learn more about [Azure Cosmos DB Query](sql-query-getting-started.md)
159
165
* Learn more about [Querying spatial data with Azure Cosmos DB](sql-query-geospatial-query.md)
160
-
* Learn more about [Geospatial and GeoJSON location data in Azure Cosmos DB](sql-query-geospatial-intro.md)
166
+
* Learn more about [Geospatial and GeoJSON location data in Azure Cosmos DB](sql-query-geospatial-intro.md)
0 commit comments