Functions | Properties
Shapefile spatial index
Shapefile modules

Functions

bool Shapefile.CreateSpatialIndex (string ShapefileName)
 Creates a new spatial index.
bool Shapefile.get_CanUseSpatialIndex (Extents pArea)
 Gets the value which indicates whether spatial index will be used for displaying certain extents of the shapefile.
bool Shapefile.IsSpatialIndexValid ()
 Checks the validity of the spatial index.
bool Shapefile.RemoveSpatialIndex ()
 Removes spatial index associated with shapefile (.mwd and .mwx files).

Properties

bool Shapefile.HasSpatialIndex [get, set]
 Gets the value indicating whether spatial index exists for the shapefile.
double Shapefile.SpatialIndexMaxAreaPercent [get, set]
 Gets or sets the value which affects the usage of spatial index.
bool Shapefile.UseQTree [get, set]
 Gets or sets a value which indicates whether built-in quad-tree spatial index should be used for shapefile.
bool Shapefile.UseSpatialIndex [get, set]
 Gets or sets a value which indicates whether spatial index should be used while working with shapefile.

Detailed Description

Here is a list of properties and methods for managing of spatial index for a shapefile. This module is a part of the documentation of Shapefile class.

dot_inline_dotgraph_33.png

Graph description


Function Documentation

bool Shapefile.CreateSpatialIndex ( string  ShapefileName)

Creates a new spatial index.

Parameters:
ShapefileNameThe name of shapefile to create spatial index for. Filename of the current shapefile should be passed usually (Shapefile.Filename).
Returns:

Gets the value which indicates whether spatial index will be used for displaying certain extents of the shapefile.

See also:
SpatialIndexMaxAreaPercent

Checks the validity of the spatial index.

Returns:
True if the index is valid and false on its absence or incompatibility.

Removes spatial index associated with shapefile (.mwd and .mwx files).

Returns:
True on success.
New API 4.9.3:
Added in version 4.9.3

Properties

bool Shapefile.HasSpatialIndex [get, set]

Gets the value indicating whether spatial index exists for the shapefile.

The set part of property does nothing. Use Shapefile.CreateSpatialIndex instead to create a new index.

Gets or sets the value which affects the usage of spatial index.

Spatial index won't be used while drawing a part of shapefile larger then specified percent. Spatial index ensures faster access to the shapes while a small portion of shapefile is being displayed. On the contrary when substantial part of shapefile is being displayed spatial index can decrease the performance. This property blocks the usage of spatial index when it is inefficient.

bool Shapefile.UseQTree [get, set]

Gets or sets a value which indicates whether built-in quad-tree spatial index should be used for shapefile.

Quad is used in editing mode only. It has nothing to do with disk based spatial index which is used by methods like Shapefile.CreateSpatialIndex.

New API 4.8:
Added in version 4.8
Examples:
SelectBox.cs, and ToolTip.cs.
bool Shapefile.UseSpatialIndex [get, set]

Gets or sets a value which indicates whether spatial index should be used while working with shapefile.

 All Classes Files Functions Enumerations Properties Events