Home » Data Sources » ArcGIS Shapefile Files Types & Extensions

ArcGIS Shapefile Files Types & Extensions

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, then we suggest reading further. Let’s take a closer inspection of what makes up an ArcGIS shapefile.

Shapefiles

What are the shapefile files?

Here is a list of all the files that make up a shapefile, including SHP, SHX, DBF, PRJ, XML, SBN, SBX, and CPG.

Main File (.SHP)

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

Index File (.SHX)

SHX are mandatory Esri and AutoCAD shape index positions. This type of file is used to search forward and backward.

dBASE File (.DBF)

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.

Projection File (.PRJ)

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.

Extensible Markup Language File (.XML)

XML file types contain 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.

Spatial Index File (.SBN)

SBN files are optional spatial index files that optimize 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.

Spatial Index File (.SBX)

SBX files are similar to .sbn files which 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.

Code Page File (.CPG)

CPG files are optional plain text files that describe 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 for shapefiles

If you need to move 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. For more information, see our list of GIS formats.

The most common GIS file type is 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, .cpg, .sbn, and .sbx. If you can recognize these differences, then you can become a master of the ArcGIS shapefile.

Subscribe to our newsletter:

8 Comments

  1. why can i not see my .shp, .shx files in windows explore? i can see the .cpg, the .prj, .sbn, .sbx but i am trying to copy these boundary so i can put into Raven CR7 and need the .shp and .shx for it to be able to read.

  2. 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

  3. 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. Required fields are marked *