ESRI Shapefile .SHP File Description


ESRI Shapefiles are typically usually used in MapViewer as base maps.


ESRI Shapefiles are in a binary file format (i.e., they can't be created or modified with a text editor or word processor) that is compatible with Arc/Info, Arc/View, and other ESRI application programs. This format is used to store spatial information including boundary objects such as areas, curves, and points. Spatial information is only concerned with the location of objects in space (i.e., their coordinates) and not with their attributes (such as line or fill style, marker symbol used, text labels, etc.).


Four types of files are produced with each export:


Filename Extension



Contains the coordinates of each object in the drawing.


Contains the file offset of each object in the .SHP file.


Contains the attribute text associated with each object in the .SHP file.


Contains the Unicode code page number.


In each of the .SHP, .SHX, and .DBF files, the shapes in each file correspond to each other in sequence. That is, the first record in the .SHP file corresponds to the first record in the .SHX and .DBF files, and so on. The .SHP and .SHX files have various fields with different endianness, so as an implementor of the file formats you must be very careful to respect the endianness of each field and treat it properly.



A shapefile is a digital vector storage format for storing geometric location and associated attribute information. This format lacks the capacity to store topological information. The shapefile format was introduced with ArcView GIS version 2 in the beginning of the 1990s. It is now possible to read and write shapefiles using a variety of free and non-free programs.


Shapefiles are simple because they store primitive geometrical data types of points, lines, and polygons. These primitives are of limited use without any attributes to specify what they represent. Therefore, a table of records will store properties/attributes for each primitive shape in the shapefile. Shapes (points/lines/polygons) together with data attributes can create infinitely many representations about geographical data. Representation provides the ability for powerful and accurate computations.


While the term "shapefile" is quite common, a "shapefile" is actually a set of several files. Three individual files are normally mandatory to store the core data that comprises a shapefile. There are a further eight optional files which store primarily index data to improve performance. Each individual file should conform to the MS DOS 8.3 file nameing convention (8 character file name prefix, fullstop, 3 character file name suffix such as shapefil.shp) in order to be compatible with past applications that handle shapefiles. For this same reason, all files should be located in the same folder.


Shapefiles deal with coordinates in terms of X and Y, although they are often storing longitude and latitude, respectively. While working with the X and Y terms, be sure to respect the order of the terms (longitude is stored in X, latitude in Y).


Mandatory files

.SHP - shape format; the feature geometry itself

.SHX - shape index format; a positional index of the feature geometry to allow seeking forwards and backwards quickly

.DBF - attribute format; columnar attributes for each shape, in dBase III format


Optional 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 for shapefiles that are read-only

.AIN and .AIH - an attribute index of the active fields in a table or a theme's attribute table

.IXS - a geocoding index for read-write shapefiles

.MXS - a geocoding index for read-write shapefiles (ODB format)

.ATX - an attribute index for the .dbf file in the form of shapefile.columnname.atx (ArcGIS 8 and later)

.SHP.XML- metadata in XML format

.CPG - file containing the single value code page to be used for ANSI to Unicode translation of attribute text in associated .DBF files.



All attributes for all polyline, polygon, and symbol objects are automatically exported to all .SHP files. For contour maps, the Z value is exported as the "ZLEVEL" attribute for all polylines in the contour map.  All attributes are automatically imported.


Shapefile shape format .SHP

Shapefile shape index format (.shx)

Shapefile attribute format .DBF

Shapefile attribute format .CPG

Shapefile projection format .PRJ

Shapefile spatial index format (.sbn)



Import Options Dialog

No import options dialog is displayed.


Import Automation Options

See ESRI Shapefile Import Automation Options


Export Options Dialog

See ESRI Shapefile Export Options Dialog


Export Automation Options

See ESRI Shapefile Export Automation Options and Scaling


See Also

File Format Chart