Anatomy of a shapefile

GeoAfrikana
2 min readSep 11, 2019

--

Esri shapefile is the most popular file format in the GIS industry.

There are many vector formats that you can use in QGIS (or your preferred GIS) in the place of Shapefile. For example, QGIS is capable of using GeoJson, Geoconcept, Spatiallite, GeoRSS, GML (Geography Markup Language) to mention only a few vector file formats. Each of these vector formats has its pros and cons.

However, shapefile enjoys many advantages that make it the industry standard.

Upon opening the folder that contains your shapefiles, you’ll observe that there is a “mess” of file formats playing around.

If you thought shapefile refers to just one file then you have been misled by the name (which is quite normal).

ESRI shapefile consists of files that have a common name but different extensions. A typical shapefile contains; CPG, DBF, PRJ, HTML SHP, SHX and TXT file extensions. All of them makeup the shapefile.

Functions of Each part of a Shapefile

  • PRJ contains the project coordinates (longitude and latitudes).
  • DBF is the database that contains the attributes of the features.
  • SHX contains the index format.
  • CPG contains the code page.
  • TXT contains read me document in plain text.
  • HTML also contains readme info. HTML files are best opened in a browser. Both Txt and HTML are important but not necessarily.
  • Then there’s the all-important SHP file which contains the geometry of the features. Little wonder ESRI named the whole pack after it.

Caution on using Shapefile

  1. Each of the extensions is indispensable; deleting or altering any of them could break or destroy your shapefile. So, whatever you do proceed with caution and you should only do what you really know.
  2. All the files of a shapefile must be in a common folder and they must share the same name else QGIS (and all other GIS software for that matter) will not recognize it.

About Nasiru:

He’s a GIS Analyst, Cartographer and CEO at GeoAfrikana Spatial Solutions. He also finds time to write articles and be a GIS tutor. His mission. “To provide cutting-edge geospatial services for researchers, businesses and governments”.

--

--

GeoAfrikana
GeoAfrikana

Written by GeoAfrikana

Freelancer | GIS Analyst | Spatial Data Scientist | Trainer

No responses yet