About Shapefiles

The shapefile format is a geospatial vector data format for geographic information system (GIS) software. It's developed and regulated by Esri as an open specification for data interoperability among Esri and other GIS software products. A shapefile contains a collection of files with a common filename prefix, stored in the same directory.

File Types

Mandatory files include the following:

  • .shp : shape format; the feature geometry itself
  • .shx : shape index format; a positional index of the feature geometry that enables forwards and backwards search
  • .dbf : attribute format; columnar attributes for each shape in dBase IV format

Other files:

  • .prj : projection format; the coordinate system and projection information, a plain text file describing the projection using well-known text format
  • .sbn and .sbx : a spatial index of the features
  • .fbn and .fbx : a spatial index of the features that are read-only
  • .ain and .aih : an attribute index of the active fields in a table
  • .ixs : a geocoding index for read-write datasets
  • .mxs : a geocoding index for read-write datasets (ODB format)
  • .atx : an attribute index for the .dbf file in the form of shapefile.columnname.atx (ArcGIS 8 and later)
  • .shp.xml : geospatial metadata in XML format, such as ISO 19115 or other XML schema
  • .cpg : used to specify the code page (only for .dbf) for identifying the character encoding to be used
  • .qix : an alternative quadtree spatial index used by MapServer and GDAL/OGR software

Geometry Column Type

A shapefile can contain only one geometry column. For a shapefile, a geometry column can contain records with one of the following types:

  • Point: a point
  • PolyLine: an object composed of several lines (broken lines), which may contact and overlap each other
  • Polygon: a polygon (may consist of several parts with voids)
  • MultiPoint: an object consisting of several points
  • PointZ: a point in a three-dimensional space (XYZ)
  • PolyLineZ: a polyline in a three-dimensional space
  • PolygonZ: a landfill in a three-dimensional space
  • MultiPointZ: a multipoint in three-dimensional space
  • PointM: a point to any measured value
  • PolyLineM: a polyline with any of the measured values
  • PolygonM: a polygon with any of the measured values
  • MultiPointM: a multipoint with any of the measured values
  • MultiPatch: a triangulation surface

Spatial Reference System Identifier

Spatial Reference System Identifier (SRID) is the ID of the coordinate systems that are used to hold and process spatial data.

When uploading a shapefile using the Metadata API, the request should contain the same SRID as the shapefile. To identify or change the SRID in the shapefile metadata, you can use the open source application, QGIS.