Alter Geometry Index Preference (Data Management Tools)
Summary
Changes the spatial index preference setting of the specified geometry field in a feature class in an SAP HANA database.
Usage
Parameters
|
Label
|
Explanation
|
Data type
|
|
Input Table
|
The spatial table for which the geometry index preference will be changed.
|
Table View; Raster Layer; Mosaic Layer
|
|
Geometry Field
|
The name of the spatial field.
|
Field
|
|
Index Preference
|
Specifies the spatial index preference setting.
Default—The default index preference configured for the database will be used.
RDICT—A rectangle dictionary spatial index will be used for the specified spatial column.
R-tree—An R-tree based spatial index will be used for the specified spatial column.
|
String
|
Derived output
|
Label
|
Explanation
|
Data type
|
|
Updated Table
|
The input table that has been altered to reflect the specified spatial index preference setting.
|
Table View
|
arcpy.management.AlterGeometryIndexPreference(in_table, geometry_field, preference)
|
Name
|
Explanation
|
Data type
|
|
in_table
|
The spatial table for which the geometry index preference will be changed.
|
Table View; Raster Layer; Mosaic Layer
|
|
geometry_field
|
The name of the spatial field.
|
Field
|
|
preference
|
Specifies the spatial index preference setting.
DEFAULT—The default index preference configured for the database will be used.
RDICT—A rectangle dictionary spatial index will be used for the specified spatial column.
RTREE—An R-tree based spatial index will be used for the specified spatial column.
|
String
|
Derived output
|
Name
|
Explanation
|
Data type
|
|
updated_table
|
The input table that has been altered to reflect the specified spatial index preference setting.
|
Table View
|
Code sample
AlterGeometryIndexPreference example 1 (Python window)
Sets the spatial index preference for the states feature class to the default spatial index setting.
# Import system modules
import arcpy
# Set spatial index preference
arcpy.management.AlterGeometryIndexPreference(
in_table=r"C:\path_to_connection_file\hana_connection_file.sde\USER1.states",
geometry_field="SHAPE",
preference="DEFAULT"
)
AlterGeometryIndexPreference example 2 (stand-alone script)
Sets the spatial index preference for the trainstations feature class to use R-tree indexes.
# Import system modules
import arcpy
# Set spatial index preference
arcpy.management.AlterGeometryIndexPreference(
in_table=r"C:\path_to_connection_file\hana_connection_file.sde\USER1.trainstations",
geometry_field="SHAPE",
preference="RTREE"
)
Environments
Current Workspace
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes