com.esri.arcgis.geoprocessing.tools.datamanagementtools
Class AddSpatialIndex
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.datamanagementtools.AddSpatialIndex
- All Implemented Interfaces:
- GPTool
- public class AddSpatialIndex
- extends AbstractGPTool
Adds a spatial index to a shapefile, file geodatabase feature class, or ArcSDE feature class.
Spatial indexes are used by ArcGIS to quickly locate features that match a spatial query. For information on spatial indexes in geodatabases, see
The Add Spatial Index tool is contained in the Data Management Tools tool box.
Software restrictions: none
Usage tips:
- This command will only work with shapefiles, feature classes in an ArcSDE geodatabase, or feature classes in a file geodatabase. Use it to add a spatial index to a shapefile or feature class that does not already have one.
- ArcGIS automatically rebuilds the spatial index at the end of certain operations in file and ArcSDE geodatabases to ensure the index is optimal. To learn how ArcGIS manages the spatial index, see Setting spatial indexes;
- Once a feature class in a personal geodatabase is created, the spatial index cannot be removed nor modified. Therefore, a spatial index cannot be added to an existing personal geodatabase feature class.
- The options Spatial Grid 1, 2, and 3, are used for file and ArcSDE geodatabase feature classes only. If you are unfamiliar with setting grid sizes, leave these options blank and ArcGIS will compute optimal sizes for you.
- If the tool is run with all 3 spatial index grid parameters set to 0, a valid set of spatial index grids will be automatically calculated for you.
- Adding a new spatial index to an ArcSDE feature class is a server-intensive operation. It should not be done on large feature classes when a large number of users are logged in to the server.
- The following environments affect this tool: output spatial grid; and workspace;
|
Constructor Summary |
AddSpatialIndex()
Creates the Add Spatial Index tool with defaults. |
AddSpatialIndex(java.lang.Object inFeatures)
Creates the Add Spatial Index tool with the required parameters. |
|
Method Summary |
java.lang.Object |
getInFeatures()
Returns the Input Features parameter of this tool . |
java.lang.Object |
getOutFeatureClass()
Returns the Output Feature Class parameter of this tool (Read only). |
double |
getSpatialGrid1()
Returns the Spatial Grid 1 parameter of this tool . |
double |
getSpatialGrid2()
Returns the Spatial Grid 2 parameter of this tool . |
double |
getSpatialGrid3()
Returns the Spatial Grid 3 parameter of this tool . |
java.lang.String |
getToolboxAlias()
Returns the alias of the tool box containing this tool. |
java.lang.String |
getToolboxName()
Returns the name of the tool box containing this tool. |
java.lang.String |
getToolName()
Returns the name of this tool. |
void |
setInFeatures(java.lang.Object inFeatures)
Sets the Input Features parameter of this tool . |
void |
setSpatialGrid1(double spatialGrid1)
Sets the Spatial Grid 1 parameter of this tool . |
void |
setSpatialGrid2(double spatialGrid2)
Sets the Spatial Grid 2 parameter of this tool . |
void |
setSpatialGrid3(double spatialGrid3)
Sets the Spatial Grid 3 parameter of this tool . |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AddSpatialIndex
public AddSpatialIndex()
- Creates the Add Spatial Index tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
AddSpatialIndex
public AddSpatialIndex(java.lang.Object inFeatures)
- Creates the Add Spatial Index tool with the required parameters.
Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.
- Parameters:
inFeatures - Feature Layer | Raster Catalog Layer, arcSDE feature class, file geodatabase feature class, or shapefile to which a spatial index is to be added.
getInFeatures
public java.lang.Object getInFeatures()
- Returns the Input Features parameter of this tool .
This parameter is Feature Layer | Raster Catalog Layer, arcSDE feature class, file geodatabase feature class, or shapefile to which a spatial index is to be added.
This is a required parameter.
- Returns:
- the Input Features
setInFeatures
public void setInFeatures(java.lang.Object inFeatures)
- Sets the Input Features parameter of this tool .
This parameter is Feature Layer | Raster Catalog Layer, arcSDE feature class, file geodatabase feature class, or shapefile to which a spatial index is to be added.
This is a required parameter.
- Parameters:
inFeatures - Feature Layer | Raster Catalog Layer, arcSDE feature class, file geodatabase feature class, or shapefile to which a spatial index is to be added.
getSpatialGrid1
public double getSpatialGrid1()
- Returns the Spatial Grid 1 parameter of this tool .
This parameter is Double, the two-dimensional grid system that spans a layer, like a locator grid you might find on a common road map. The first, or lowest, grid level has the smallest cell size.
One to three 2D grids (also referred to as grid levels), each with a distinct cell size, are created. Set the cell sizes of the other grids to 0 if you only want one; otherwise, set each level at least three times larger than the previous level.
This is an optional parameter.
- Returns:
- the Spatial Grid 1
setSpatialGrid1
public void setSpatialGrid1(double spatialGrid1)
- Sets the Spatial Grid 1 parameter of this tool .
This parameter is Double, the two-dimensional grid system that spans a layer, like a locator grid you might find on a common road map. The first, or lowest, grid level has the smallest cell size.
One to three 2D grids (also referred to as grid levels), each with a distinct cell size, are created. Set the cell sizes of the other grids to 0 if you only want one; otherwise, set each level at least three times larger than the previous level.
This is an optional parameter.
- Parameters:
spatialGrid1 - Double, the two-dimensional grid system that spans a layer, like a locator grid you might find on a common road map. The first, or lowest, grid level has the smallest cell size.
One to three 2D grids (also referred to as grid levels), each with a distinct cell size, are created. Set the cell sizes of the other grids to 0 if you only want one; otherwise, set each level at least three times larger than the previous level.
getSpatialGrid2
public double getSpatialGrid2()
- Returns the Spatial Grid 2 parameter of this tool .
This parameter is Double, the two-dimensional grid system that spans a layer, like a locator grid you might find on a common road map. The first, or lowest, grid level has the smallest cell size.
One to three 2D grids (also referred to as grid levels), each with a distinct cell size, are created. Set the cell sizes of the other grids to 0 if you only want one; otherwise, set each level at least three times larger than the previous level.
This is an optional parameter.
- Returns:
- the Spatial Grid 2
setSpatialGrid2
public void setSpatialGrid2(double spatialGrid2)
- Sets the Spatial Grid 2 parameter of this tool .
This parameter is Double, the two-dimensional grid system that spans a layer, like a locator grid you might find on a common road map. The first, or lowest, grid level has the smallest cell size.
One to three 2D grids (also referred to as grid levels), each with a distinct cell size, are created. Set the cell sizes of the other grids to 0 if you only want one; otherwise, set each level at least three times larger than the previous level.
This is an optional parameter.
- Parameters:
spatialGrid2 - Double, the two-dimensional grid system that spans a layer, like a locator grid you might find on a common road map. The first, or lowest, grid level has the smallest cell size.
One to three 2D grids (also referred to as grid levels), each with a distinct cell size, are created. Set the cell sizes of the other grids to 0 if you only want one; otherwise, set each level at least three times larger than the previous level.
getSpatialGrid3
public double getSpatialGrid3()
- Returns the Spatial Grid 3 parameter of this tool .
This parameter is Double, the two-dimensional grid system that spans a layer, like a locator grid you might find on a common road map. The first, or lowest, grid level has the smallest cell size.
One to three 2D grids (also referred to as grid levels), each with a distinct cell size, are created. Set the cell sizes of the other grids to 0 if you only want one; otherwise, set each level at least three times larger than the previous level.
This is an optional parameter.
- Returns:
- the Spatial Grid 3
setSpatialGrid3
public void setSpatialGrid3(double spatialGrid3)
- Sets the Spatial Grid 3 parameter of this tool .
This parameter is Double, the two-dimensional grid system that spans a layer, like a locator grid you might find on a common road map. The first, or lowest, grid level has the smallest cell size.
One to three 2D grids (also referred to as grid levels), each with a distinct cell size, are created. Set the cell sizes of the other grids to 0 if you only want one; otherwise, set each level at least three times larger than the previous level.
This is an optional parameter.
- Parameters:
spatialGrid3 - Double, the two-dimensional grid system that spans a layer, like a locator grid you might find on a common road map. The first, or lowest, grid level has the smallest cell size.
One to three 2D grids (also referred to as grid levels), each with a distinct cell size, are created. Set the cell sizes of the other grids to 0 if you only want one; otherwise, set each level at least three times larger than the previous level.
getOutFeatureClass
public java.lang.Object getOutFeatureClass()
- Returns the Output Feature Class parameter of this tool (Read only).
This is an derived parameter.
- Returns:
- the Output Feature Class
getToolName
public java.lang.String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public java.lang.String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public java.lang.String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias