ArcGIS uses spatial indexes to improve the performance of spatial queries for feature classes. This applies when identifying a feature, selecting features, displaying or drawing a box, as well as when panning and zooming.
When you create an empty feature class or import data to create a feature class in a geodatabase from ArcGIS, a spatial index is created for the feature class. The spatial index is used for querying and editing data.
ArcGIS automatically rebuilds the spatial index after completing certain operations in file, enterprise, workgroup, and desktop geodatabases. Therefore, it is rarely necessary to manually rebuild an index yourself. Rebuilding the spatial index is recommended only after adding a large number of features that differ in size from those already contained in the feature class.
You can rebuild the spatial index of feature classes for the following database types via the Properties dialog in ArcCatalog:
- Feature classes in a file geodatabase.
- Feature classes of the "ST_Geometry" type in an Oracle Enterprise Geodatabase.
- Feature classes in a Microsoft SQL Server Enterprise Geodatabase.
Spatial indexes for feature classes in personal geodatabases are managed automatically, are always optimal, and cannot be updated or rebuilt.
To rebuild a spatial index for a feature class via the Properties dialog, proceed as follows:
- Open ArcCatalog and navigate to the chosen feature class.
- Open the Properties of the feature class.
- Click on the tab Index.
- How you change the spatial index of the feature classes then depends on the type of database that contains the feature class.
- For feature classes stored in MS SQL Server, click Recalculate so that ArcGIS can set the size of the grid.
- For feature classes stored in Oracle, click Recalculate.
- For feature classes in a file geodatabase, click Delete to remove the spatial index, then click Create to create a new index.
Reference article: https://desktop.arcgis.com
Creating Spatial Indexes in an MS SQL Server Enterprise Geodatabase
Geocom provides you with an ArcGIS toolbox for creating and managing enterprise geodatabases. You can download the toolbox from GitHub.
Part of it is a script for creating spatial indexes. The script rebuilds the spatial indexes for all feature classes in a database. To do this, proceed as follows:
- Open ArcCatalog and navigate to Geocom Database Management Tools
- Start the tool Set spatial indexes geometry (MSSQL).
- Drag the database connection file of the data owner into the field Database owner connection
- Enter the system administrator password of the SQL Server instance in the field SA password (optional).
-
Drag a feature class into the field FeatureClass for Extent (optional).
All feature classes will now receive this bounding box. Note that the extent of all feature classes should be approximately the same. If there are large differences (e.g., entire Switzerland vs. a small municipality), different extents must be used. Use the method via the properties in ArcCatalog for this. - The coordinate values are filled in automatically:
- Start the script by clicking OK.
Comments
0 comments
Article is closed for comments.