Proceed to GeoCommunity Home Page


SpatialNewsGIS Data DepotGeoImaging ChannelGIS and MappingSoftwareGIS JobsGeoBids-RFPsGeoCommunity MarketplaceGIS Event Listings
HomeLoginAccountsAboutContactAdvertiseSearchFAQsForumsCartFree Newsletter

Sponsored by:


TOPICS
Today's News

Submit News

Feature Articles

Product Reviews

Education

News Affiliates

Discussions

Newsletters

Email Lists

Polls

Editor's Corner


SpatialNews Daily Newswire!
Subscribe now!

Latest Industry Headlines
SiteVision GIS Partnership With City of Roanoke VA Goes Live
Garmin® Introduces Delta™ Upland Remote Trainer with Beeper
Caliper Offers Updated Chile Data for Use with Maptitude 2013
Southampton’s Go! Rhinos Trail Mapped by Ordnance Survey
New Approach to Measuring Coral Growth Offers Valuable Tool for Reef Managers
Topo ly - Tailor-Fit for Companies' Online Mapping Needs

Latest GeoBids-RFPs
Nautical Charts*Poland
Software & Telemetry GPS
Spatial Data Management-DC
Geospatial and Mapping-DC
Next-Gen 911-MO

Recent Job Opportunities
Planner/GIS Specialist
Team Leader- Grape Supply Systems
Geospatial Developer

Recent Discussions
Raster images
cartographic symbology
Telephone Exchange areas in Europe
Problem showcasing Vector map on Windows CE device
Base map

GeoCommunity Mailing List
 
Mailing List Archives

Subject: Re: [gislist] Free GIS Software
Date:  05/05/2005 12:50:01 PM
From:  Chris 'Xenon' Hanson



Frank Warmerdam wrote:
> 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.

Until recently, my software read SHP files without using the SHX, simply by sequential
record reading. We didn't need random-access, so this was easy enough. Also, we'd
encountered situations where a user had mistakenly omitted the SHX file in transferring data.

A few weeks ago, this was blown out of the water by a SHP file I received, allegedly
written by an ESRI product (never did establish the exact ancestry of the file/data). In
this file, two records were separated (786 records in...) by some junk padding data. The
SHX file correctly indicated that the 787th record began some distance after where the
786th record ended.

Our sequential reader had no way to cope with the problem.

Thus, we added SHX support, and if the SHX file is missing, we fall back to the
sequential reader.


The SHP world is a strange place indeed.

> Best regards,

--
Chris 'Xenon' Hanson, omo sanze lettere Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
_______________________________________________
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!

Copyright© 1995-2012 MindSites Group / Privacy Policy

GeoCommunity™, Wireless Developer Network™, GIS Data Depot®, and Spatial News™
including all logos and other service marks
are registered trademarks and trade communities of
MindSites Group