VectorLayer.UseSpatialIndex
UseSpatialIndex(string, bool)
Loads spatial index to speed up filtering by attributes value in filter methods like WhereIntersects and NearestTo. If index does not exist creates it first. Use forceRebuild to force index recreation.
public void UseSpatialIndex(string indexPath, bool forceRebuild = false)
| Parameter | Type | Description |
|---|
| indexPath | String | Path to the index file. |
| forceRebuild | Boolean | Whether to recreate index even if it already exists. |
Exceptions
| exception | condition |
|---|
| ArgumentNullException | Path is null. |
| IOException | An I/O error occurred. |
| InvalidOperationException | Spatial index is already loaded for this layer. |
| GisException | File exists and it is not a spatial index file created by Aspose.GIS. |
See Also
UseSpatialIndex(AbstractPath, bool)
Loads spatial index to speed up filtering by attributes value in filter methods like WhereIntersects and NearestTo. If index does not exist creates it first. Use forceRebuild to force index recreation.
public virtual void UseSpatialIndex(AbstractPath indexPath, bool forceRebuild = false)
| Parameter | Type | Description |
|---|
| indexPath | AbstractPath | Path to the index file. |
| forceRebuild | Boolean | Whether to recreate index even if it already exists. |
Exceptions
| exception | condition |
|---|
| ArgumentNullException | Path is null. |
| IOException | An I/O error occurred. |
| InvalidOperationException | Spatial index is already loaded for this layer. |
| GisException | File exists and it is not a spatial index file created by Aspose.GIS. |
See Also