Knowledge Base



KB10750 - Upon enabling R-Tree spatial indexing the SHP file layer becomes slower.

If the SHP file was created with non-TatukGIS software, verify that the obligatory *.shx file exists. By definition, a complete SHP format map file is composed of a *.shp file containing the map geometry, a *.shx index file, and a *.dbf file containing the attribute information. While TatukGIS products may generally open a SHP layer even if the *.shx file with the index information is missing, this can cause a mess when the R-tree indexing is activated because R-tree uses information from the *.shx file.

If the *.shx file is found to be missing, the .shx file can be generated using one of the following methods:

Using the TatukGIS Editor:

  1. “Touch” a shape in the SHP layer by editing something then reverting changes (to mark the layer as touched). Then save the changes, or
  2. Open the layer and export under a new file name.

Using the TatukGIS Developer Kernel:

  1. Add a new shape to the SHP layer and then delete the new shape (just to mark the layer as touched). Then call layer.SaveData, or
  2. ‚ÄčImport the corrupted layer to a new TGIS_LayerShape.

A less likely reason for the speed problem is the R-tree file is corrupted. If this is suspected, try regenerating the R-tree index.

Created: April 06, 2007, Modified: September 25, 2015