Available with Advanced license.
Summary
Creates an attribute index to increase access speed to the specified item during query operations.
Usage
Indexed items speed up selection operations of large INFO files.
Item indexes are preserved when the coverage or INFO table is copied to a new location.
Item indexes are preserved when exporting and importing a coverage to an interchange (.e00) file using the Export To Interchange File and Import From Interchange File tools.
Items must be indexed to support native mode reselects against external database management system (DBMS) tables.
An index file becomes outdated if the following commands are used on the INFO table: Calculate Field, Update, Build, or Clean. Attempting to use the outdated index will cause the following message to be generated: "Index file is obsolete." If you receive this message, rebuild the index file and continue.
The following commands are affected by indexed items: Eliminate, Select, and Join Info Tables.
Syntax
arcpy.arc.IndexItem(in_info_table, index_item)
Parameter | Explanation | Data Type |
in_info_table | The name of the INFO table containing the item to be indexed | INFO Table |
index_item | The name of the item to be indexed | INFO Item |
Code sample
IndexItem example (stand-alone script)
The following stand-alone script demonstrates how to index an item in a coverage, and then select features using the indexed item.
# Name: IndexItem_Example.py
# Description: Indexes an item then uses that item to select features.
# Requirements: ArcInfo Workstation
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inInfoTable = "stream/arc"
indexItem = "STRM_ORD"
inCover = "stream"
outCover = "C:/output/lowerstreams"
infoExpress = ["RESELECT STRM_ORD > 3"]
# Execute IndexItem
arcpy.IndexItem_arc(inInfoTable, indexItem)
arcpy.Reselect_arc(inCover, outCover, infoExpress)
Environments
Licensing information
- Basic: No
- Standard: No
- Advanced: Requires ArcInfo Workstation installed