ESRI Shapefile

The ESRI Shapefile (known here as the ESRI Shapefile format), stores nontopological geometry and attribute information for the spatial features in a data set. A shapefile consists minimally of a main file, an index file, and a dBASE table.

In the main file, the geometry for a feature is stored as a shape comprising a set of vector coordinates. This main file is a direct access, variable-record-length file in which each record describes a shape with a list of its vertices. In the index file, each record contains the offset of the corresponding main file record from the beginning of the main file. Attributes are held in a dBASE format file. The dBASE table contains feature attributes with one record per feature. Attribute records in the dBASE file must be in the same order as records in the main file. Each attribute record has a one-to-one relationship with the associated shape record.

The shapefile format can support point, line, and area features. Area features are represented as closed loop, double-digitized polygons.

Instances of the Shapefile format have often been used as a data exchange format from ESRI formats to non-ESRI applications. The format is most useful for writing simple features and attributes quickly as there are limitations inherent in the Shapefile format related to both geometry and attributes. As outlined elsewhere in this description, these limitations may cause loss of data when using shapefiles to contain or exchange complex geometry or attributes. The Shapefile format may be used as an intermediary between data creation applications and more functionally capable GIS formats and applications, albeit with the limitations noted in the Dataset/Normal Dataset section.

The cluster of files is typically stored in the same file directory or project workspace, with all component files having the same filename (prefix) and identified by individual file extension (suffixes). Three components are mandatory: a main file that contains the feature geometry (.shp), an index file that stores the index of the feature geometry (.shx), and a dBASE table (.dbf) that stores the attribute information of features. A comprehensive list of component files follows:

  • shp — Main file (mandatory); a direct access, variable-record-length file in which each record describes a shape with a list of its vertices.
  • shx — Index file (mandatory). In the index file, each record contains the offset of the corresponding main file record from the beginning of the main file. The index file (.shx) contains a 100-byte header followed by 8-byte, fixed-length records.
  • dbf — dBASE Table file (mandatory); a constrained form of DBF that contains feature attributes with one record per feature. The one-to-one relationship between geometry and attributes is based on record number. Attribute records in the dBASE file must be in the same order as records in the main file.
  • sbn — Part 1 of spatial index for read-write instances of the Shapefile format. If present, essential for correct processing.
  • sbx — Part 2 of spatial index for read-write instances of the Shapefile format. If present, essential for correct processing.
  • atx — Created by ArcView 3.x for each instance of the Shapefile format or dBASE attribute index created in ArcCatalog. ArcView GIS 3.x attribute indexes for shapefiles and dBASE files are not used by later versions of ArcGIS as a new attribute indexing model has been developed for shapefiles and dBASE files.
  • fbn — One of the files that store the spatial index of the features for instances of the Shapefile format that are read-only.
  • fbx — The other file (besides .fbn) that stores the spatial index of the features for instances of the Shapefile format that are read-only.
  • ain — One of the files that stores the attribute index of the active fields in a table or a theme’s attribute table.
  • aih — The other file (besides .ain) that stores the attribute index of the active fields in a table or a theme’s attribute table
  • ixs — Geocoding index for read/write shapefiles. If present, essential for correct processing.
  • mxs –Geocoding index for read-write shapefiles (ODB format).
  • prj — Projections Definition file; stores coordinate system information.
  • xml — contains metadata, as used by ArcGIS.
  • cpg — An optional file that can be used to specify the codepage for identifying the character set to be used.

See Notes for more information about filenames and contents.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: