shx
What is a .shx file?
application/vnd.shx
The .shx file is the positional index of an Esri shapefile. It repeats the .shp header and then stores one fixed 8-byte record per feature, giving the byte offset and content length of that feature in the .shp file, so a reader can seek directly to feature N instead of scanning from the start.
How to use a .shx file
Use an example .shx file to test shapefile readers and repair tools, verifying that offsets resolve to real records in the .shp file and that a reader detects a mismatch between the index and the geometry rather than reading past the end.
Download example .shx files
- Shapefile — Towns Index (.shx)The index that lets a reader seek directly to record N of the .shp instead of walking the file. Its header duplicates the .shp header exactly, and a mismatch between the two is the most common way a hand-edited shapefile goes wrong.
- Shapefile — Roads Index (.shx)Unlike the point index, these entries have different lengths because each PolyLine holds a different number of vertices. That makes it the useful case for testing seek logic — a reader that assumes a fixed stride reads the first record correctly and then garbage.
- Shapefile — Parcels Index (.shx)The parcel index, whose second entry is markedly longer than the others because that record carries two rings. Use it together with the roads index to check that seek logic handles multi-part records as well as multi-record files.
- Convert v2 Shapefile SHX CompanionReal SHX component from the five-town Kestrel Bay shapefile set, copied byte-for-byte into the Convert v2 reserve. Stable P8 artifact p8-convert-shapefile-shx.