I want to use QGIS to extract lat/lng data from the vertices of polygons. There are about 400 polygons, each with maybe 200 vertices. I am having trouble with step one, getting the data into QGIS.

The polygons are viewable in ArcGIS Explorer using a zip file that contains files with the following extenstions:

.shp, .dbf, .sbn, .sbx, and .prj

I can load the .shp file into QGIS, but without the other files there is nothing to view. How do I load the .dbf, .sbn, .sbx and .prj files into QGIS?

4 Answers 4


The set of files that you have is referred to collectively, as a Shapefile. It is a common spatial data format developed by ESRI that is used for data transfer between many different packages.

This format consists of 3 primary files with the same name, but the following file extensions:

  • .shp
  • .dbf
  • .shx

A file containing Projection information:

  • .prj

Plus a couple of files generated by software that are spatial indexes:

  • .sbn
  • .sbx

Of the first 3 files, the .shp file contains the spatial information, namely, x,y coordinate pairs describing the point, line or polygon features contained in the file.

The .dbf file is a dbase format file, and contains the Attribute information, or the descriptive characteristics of the features. Some examples of this would be: "Name", if the feature is a point representing a city; "Road Name", or "Speed", if the feature is a line representing a street; or "Population" if the feature is a polygon representing a county area*, or country.

The .shx file acts as a linking file between the .shp and .dbf. It matches up the correct row in the .shp file with the correct record in the .dbf file.

Without these first 3 files, you do not have a valid shapefile.

The other files listed are optional, though the .prj is necessary for correct positioning of your data with respect to other spatial data, and for measuring and calculating distance. See Map Projection, for more information.
The .sbx and .sbn are generally created automatically when the shapefile is created. They can, however, be deleted and recreated without invalidating the shapefile as a whole.

Generally, when you use software that is able to read this format, the files listed in the add layers window are the .shp file. The other files are automatically loaded in. If, however, there is a problem with one of the 3 primary files, the .shp file may be loaded in, but an error will appear saying that this is not a valid shapefile, or simply no features will appear.

In the case you have shown, you appear to be missing the critical .shx file. Without this, there is no connection between the spatial features and the attribute data, thus the software is not able to load the shapefile in properly. What you need to do is go back to the source of your data and make sure that you obtain the .shx file as well. Once you do that, you should be able to load the data in with no problems.

This answer may be overkill, but it helps to know what the files included in a shapefile are for. It may help in the future to know what to look for if you encounter a similar problem.

  • 1
    This post was extremely helpful and very much appreciated. Thanks. I have now loaded the data (thanks to the missing .shx file).
    – tomb
    Commented Jun 25, 2012 at 2:36
  • 2
    The purpose of the .shx is to locate the Nth feature in the variable record-width .shp; the .dbf has fixed record sizes, and doesn't need any help.
    – Vince
    Commented Apr 1, 2014 at 15:49
  • It is possible to open the .dbf in Access 2016? When I try to open the file directly, or try to link to it as an external datasource, I get an error that The Microsoft Access database engine could not find the object 'tl_2016_us_zcta510'. I've tried all three versions, dBase5, dBase IV, and dBase III.
    – Tim
    Commented Jul 21, 2017 at 14:39

QGIS 1.8 has the ability to open zip files directly. See here for more details


Otherwise, you can always unzip the .zip file and extract all the files in a folder. After that, once you open the .shp file, it would show up correctly.

  • That's cool, if only ArcGIS could do the same!
    – Dan C
    Commented Jun 25, 2012 at 16:28

If the shapefile loads into QGIS you can view the attribute data (the data stored in the *.dbf file) by right-clicking on the layer in the layers panel and going down to 'Open Attribute Table'.


QGIS can read a broken shapefile even without the .dbf file. In that case the attribute data gets lost, but not the geometry.

The .shx file however is necessary. It contains the same metadata header as the .shp file, and the index to the individual records of the .shp file.

See also the wikipedia entry on Shapefiles.

Not the answer you're looking for? Browse other questions tagged or ask your own question.