[Qgis-developer] shx missing

Martin Dobias wonder.sk at gmail.com
Fri Oct 7 11:52:11 EDT 2011


On Fri, Oct 7, 2011 at 11:43 AM, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
>  A missing .shx file in a shapefile can't easily be reconstructed. The
> .shp file is essentially just a big unstructured list of coordinates,
> and the .shx gives the start and finish of each feature in that big
> list (then the .dbf stores the attributes).
>
>  For a points shapefile it might be easy, since each point is the same
> size in the .shp file. But for lines/polygons you'd need to know where
> to start each polygons' coordinates in the big .shp file.

Not really. shx file is there just for faster indexing. However I do
not see a reason why shx file couldn't be recovered from a shp file -
it consists of sequentially written records with variable size, each
record has a header stating its length.

Martin


More information about the Qgis-developer mailing list