Shapefiles began as a proprietary file format from Esri, creator of the ArcGIS series of products, but has now become a standard GIS file format. There are, however, a few things that new shapefile users need to know. (PDF: Shapefiles Help Guide)
#1: Shapefiles can contain ONLY point, line, or polygon (area) features.
It is not possible for a shapefile to have more than one type of feature. For example, a shapefile cannot have both lines and points. When you create a new shapefile in GIS software, you will need to choose which type of feature you want.
#2: Shapefiles contain many separate files when you look at them in Windows Explorer, but look like only one file when you view them in GIS software (e.g. ArcMap, QGIS, etc.).
There are at least three separate files that comprise one shapefile, and sometimes as many as eight. They are all described in #4, below.
#3: When copying a shapefile in Windows Explorer, you need all of the files.
Rule of thumb: if the filename has the same letters/numbers before the file extension (a.k.a.: before the dot), you need it. In the example in #2, you’d need everything that starts with ONfsa. Take it all!
While not all shapefiles have eight parts like the one in the example above, every shapefile will have at least 3: .dbf, .shp, and .shx.
#4: What are all the files in Windows Explorer, and why are they not always consistent?
Three shapefile components are absolutely necessary (.dbf, .shp, and .shx) while others are not. Remember: just take every file that has the same filename before the extension!
- .dbf is the database, or where the data you view in the attribute table is stored
- .htm is metadata in HTML format
- .prj contains the projection information which properly locates the shapefile on the surface of the Earth
- .sbn is a spatial index
- .sbx is also a spatial index
- .shp contains the geometry, such as whether there are point, line, or polygon features
- .shp.xml is metadata in XML format
- .shx is the shape positional index file
If you have any questions, please do not hesitate to contact us!