Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If we want to get information about a vector layer (shapefile for example) we could use ogrinfo:

ogrinfo -so myshapefile.shp mylayer

This returns a lot of pertinent information about the shapefile. Is it possible to return whether or not a spatial index exists? If so, can we access info about the spatial index?

Note: I realize it is trivial to open the folder containing the shapefile and looking for a .sbn or .sbx and so the question is specific to ogrinfo.

share|improve this question

Ogr does not use the ESRI spatial Index files .sbn, sbx. It creates a .qix file which may contain a spatial index and/or an attribute index. You can build the .qix via ogrinfo.
Ogr shapefile driver

I also found a GDAL ticket mentioning .sbn file is now readable. Not sure what this means.
ticket #4719

share|improve this answer
"Starting with OGR 1.10, [the ESRI Shapefile driver] can also use the ESRI spatial index files (.sbn / .sbx)" – Mike T Mar 6 '13 at 22:32
@MikeToews Looks like I had better upgrade. Thanks! – Jay Laura Mar 7 '13 at 3:06
@JayLaura 1.10 is not released yet, but I'm certain the developers would love to have it tested – Mike T Mar 7 '13 at 3:31
GDAL/OGR 1.10.0 came out last week: – kyle May 6 '13 at 21:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.