ArcGIS Shapefile Files Types & Extensions

shapefile files

Last Updated: Aug 15, 2017

What are the shapefile files?

ArcGIS shapefiles have mandatory and optional files. The mandatory file extensions needed for a shapefile are .shp, .shx and .dbf. But the optional files are: .prj, .xml, .sbn and .sbx

What is the function of each of these ArcGIS file types? Also, how do you open these GIS files?

If you have several hours to spare, you could go through the 34-page ESRI Shapefile Technical Description document.

If time is a factor, than we suggest to read further. Let’s take a closer inspection at what makes up an ArcGIS shapefile.


List of shapefile files

.shp is a mandatory Esri file that gives features their geometry. Every shapefile has its own .shp file that represent spatial vector data. For example, it could be points, lines and polygons in a map.

.shx are mandatory Esri and AutoCAD shape index position. This type of file is used to search forward and backwards.

.dbf is a standard database file used to store attribute data and object IDs. A .dbf file is mandatory for shape files. You can open .DBF files in Microsoft Access or Excel.

Shapefile Files
Shapefile Files

.prj is an optional file that contains the metadata associated with the shapefiles coordinate and projection system. If this file does not exist, you will get the error “unknown coordinate system”. If you want to fix this error, you have to use the “define projection” tool which generates .prj files.

.xml file types contains the metadata associated with the shapefile. If you delete this file, you essentially delete your metadata. You can open and edit this optional file type (.xml) in any text editor.

.sbn is an optional spatial index file that optimizes spatial queries. This file type is saved together with a .sbx file. These two files make up a shape index to speed up spatial queries.

.sbx are similar to .sbn files in which they speed up loading times. It works with .sbn files to optimize spatial queries. We tested .sbn and .sbx extensions and found that there were faster load times when these files existed. It was 6 seconds faster (27.3 sec versus 33.3 sec) compared with/without .sbn and .sbx files.

.cpg are optional plain text files that describes the encoding applied to create the shapefile. If your shapefile doesn’t have a cpg file, then it has the system default encoding.

Mandatory and optional files that make up a shapefile

If you need tomove shapefile files in Windows Explorer, you should drag and drop all the mandatory and optional files.

If you are in ArcCatalog, it will move all the mandatory and optional files for you.

There are over 150 different GIS file extensions that exist that are exclusively for GIS. But this doesn’t even include AutoCAD and common image formats.

The most common GIS file type are shapefiles. Even the USGS Earth Explorer accepts shapefiles as input to define boundaries.

Shapefiles are composed of 3 mandatory files .shp, .shx and .dbf. But the optional files that make up a shapefile are: .xml, .prj, .sbn, and .sbx.

If you can recognize these differences, then you can become a master of the ArcGIS shapefile.

1 Comment

  1. I would like to know whether the .prj file timestamp will ever be different than the .shp file?
    I have a set of shape files (.prj, .shp, .dbf, .shx), all have exactly the same timestamp however the .prj file has a timestamp that is 15min earlier. Does this mean that the .shp file was not created using the .prj file?
    If one saves the shape files do all the files not get saved with the same timestamp?

Leave a Reply

Your email address will not be published.