Package com.partnersoft.formats.shapefile

The ESRI shapefile format.

See: Description

Package com.partnersoft.formats.shapefile Description

The ESRI shapefile format.

Shapefile is an open GIS format published and used by ESRI. The term is a bit misleading, since in practice a "shapefile" consists of at least three files, with the same name with different extensions:

The .shx file is not strictly necessary for reading the data, it is used to optimize display. There may be other files as well, these are either extensions to the .dbf format (.dbx, etc.) or legend or thematic information. However, the core of the format is the combination of geometry from the .shp file with data from the .dbf.

Record numbers are used to tie the files together in a one-to-one relationship. For example, shape #288 in the .shp file corresponds to data record #288 in the .dbf file.

Only one type of geometry can be stored in a given shapefile, and only one tabular data definition. You can picture a shapefile as being a table of data values; each column has a field name, and there is an extra field storing the geometry. More complex data models must be defined externally to the shapefile format itself.

The binary structure of geometric shapes in this format is also used in ESRI Arc/Info geodatabase formats. In fact, an ESRI personal geodatabase (.mdb format) can be thought of as a set of shapefiles stored in a relational database. The situation with Arc/SDE is more complex, since it has its own coordinate storage format and some of its own geometry formats in addition to shapefile standards. This package does support some of those extensions (e.g. bulged polylines).

In general, types pertaining to the shapefile and personal geodatabase format are prefixed with Shp, and those pertaining to the Arc/Info SDE format are prefixed with Sde. All geometric types follow the Immutable pattern for the same reasons that com.partnersoft.geometry.xy does.

ESRI publishes the format in a short, straightforward document. At time of writing it was available here: www.esri.com/library/whitepapers/pdfs/shapefile.pdf.

Wikipedia also has a good introduction at http://en.wikipedia.org/wiki/Shapefile.

Copyright 2006-2007 Partner Software, Inc.

Author:
Paul Reavis, Russell Cagle