GIS

Shapefile

Esri's published vector data format: a main file of shapes (.shp), an index (.shx), and a dBASE attribute table (.dbf) that travel together.

Detailed Definition

A shapefile is a vector data format published by Esri. The "ESRI Shapefile Technical Description," an Esri white paper dated July 1998, says: "A shapefile stores nontopological geometry and attribute information for the spatial features in a data set." The paper gives "all the technical information necessary for writing a computer program to create shapefiles" without Esri software.

The required files

"An ESRI shapefile consists of a main file, an index file, and a dBASE table."

  • .shp, the main file, where each record "describes a shape with a list of its vertices"
  • .shx, the index, where each record holds the position of the matching main-file record
  • .dbf, the attribute table, with "one record per feature"

The only link between a shape and its attributes is order: "Attribute records in the dBASE file must be in the same order as records in the main file." All three files share one name prefix.

Rules in the specification

  • One shape type per file: "Currently, shapefiles are restricted to contain the same type of shape." Points, lines, and polygons go in separate shapefiles.
  • Null shapes: "A shape type of 0 indicates a null shape, with no geometric data for the shape."
  • Polygon rings: rings are closed. The outer ring runs clockwise and "Rings defining holes in these polygons have a counterclockwise orientation," the opposite of GeoJSON. Polygons "must be clean," with no self-intersections.
  • Numbers: integers and double-precision values; "Positive infinity, negative infinity, and Not-a-Number (NaN) values are not allowed."

Size and editing limits

Esri's ArcMap documentation: "Each of the component files of a shapefile is limited to 2 GB each." For topology and other advanced editing, Esri says "you will need to import the shapefile into a geodatabase as a feature class." See Geodatabase and Feature Class.

Why it matters in mining claim research

Shapefiles are still a common way to trade mining claim polygons, PLSS grids, and field data. Two checks prevent most problems. First, confirm that the .shp, .shx, and .dbf arrived together, since the attributes line up with the shapes only by record order. Second, confirm the coordinate system and datum from the sender, because the 1998 specification describes no file for them. BLM's own MLRS mining claim metadata names "File geodatabase" as the data format. See Datum.