|
|
| GeoCommunity Mailing List |
| |
| Mailing List Archives |
| Subject: | Re: [gislist] Free GIS Software |
| Date: |
05/04/2005 01:25:01 PM |
| From: |
Frank Warmerdam |
|
|
On 5/4/05, Steve Laine <slaine@barclaymaps.com> wrote: > Can anyone tell me what is the purpose of the .shx file relating to an ArcView shape > file?
Steve,
The .shx file contains the offset of each shape in the .shp file. So, essentially you can think of it as an "index" built on the shapeid.
Without it, if you wanted shape 1034 in abc.shp you would need to scan through from the beginning, counting as you process shapes, till you found the 1034th. With the .shx you can just lookup the 1034th entry in the .shx to get the file offset in the .shp to go to.
The .shx is really only important for variable length shapes. So for point files it is unnecessary since all points are the same length. But for lines and polygons it helps alot for lookup-by-index.
I would add that the .shx is covered in the ESRI Shapefile specification though it doesn't really address the rationale as far as I know.
Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent _______________________________________________ gislist mailing list gislist@lists.geocomm.com http://lists.geocomm.com/mailman/listinfo/gislist
_________________________________ This list is brought to you by The GeoCommunity http://www.geocomm.com/
|
|

Sponsored by:

For information regarding advertising rates Click Here!
|