A shapefile is a data format used to store geographic information. It usually consist of at least three different types of files: a .shp (containing the geometry information), a .shx (a compiled .shp that allows programs to interpret the information more quickly) and a .dbf (a database file which stores attributes for each shape).
QGIS is an open source application used to visualize and edit geographic information. It also provides features to analyze different kinds of information using maps as reference.
In this post I’ll explain how you can open your shapefiles using QGIS.
Installing QGIS in Mac OS X
If you haven’t downloaded QGIS yet, go to the following link.
Installing QGIS in Mac OS X can be a little bit tricky. Be sure to install the following libraries first: GDAL (http://www.kyngchaos.com/software:frameworks#gdal_complete) , MATPLOTLIB (https://github.com/matplotlib/matplotlib/downloads/).
Opening the shapefile
Once you have installed QGIS correctly follow the next steps to open your shapefiles.
1. Open QGIS.
Depending on your QGIS version, you’ll see a page like this one.
2. Go to Layer > Add Vector Layer
3. Select the .shp file from your computer and press “Open”.
Result of opening a shapefile.
Displaying the shapefile over a map (Google Map or OpenStreetMap)
All this geographic information might not make much sense if it’s not displayed over a map.
To do so, follow the next steps:
1. First, you need to install a plugin to use the map service. Go to Plugins > Manage and Install Plugins…
2. Look for the “OpenLayers Plugin” and press “Install Plugin”.
3. Once you have installed the plugin, go to Plugin > OpenLayers plugin and select your favorite map service. In this case we are using OpenStreetMap so we click on “Add OpenStreetMap layer”.
You should now see a map, but not the shapefile you have previously imported. This is because the layer of the map is over your shapefile.
To fix this, go to the Layers Panel (the one in the left) and grab your shapefile to the top of the list.
Now you should see the shapefile over the map you chose.
That’s it, hope you found this information useful. If you have any question leave me a comment or check the QGIS documentation in the following link.
See you in the next post 🙂