When creating maps, you can either create static maps (which stay fixed, for example to print paper copies of a map) or dynamic maps (which are updated as the source material is updated, i.e. whenever OpenStreetMap (OSM) is updated, and are accessed digitally with an internet connection). All of our maps draw data from OpenStreetMap and all of the data we collect is uploaded to this platform.
To create static maps, Ramani Huria uses the GIS software, QGIS, and to create dynamic maps, often known as ‘Slippy Maps’, we use Mapbox Studio. In this blog post, we’ll explain how to create static maps with QGIS. If you’re interested in creating dynamic digital maps, please see our blog post: How to: Map creation – dynamic slippy maps with Mapbox Studio.
We introduced QGIS in a previous how-to blog post , including how to install the software and InaSAFE plugin, to ensure you have read that post first and have QGIS installed on your machine.
Why use QGIS to create static maps?
Ramani Huria endeavours to use open-source software and tools wherever possible. Not only does this align with our values of community mapping and open data, it ensures that our student and community based mappers will have access to the tools and knowledge to create their own maps. As QGIS software is open-source, it is free for anyone to download and use. Additionally, it supports the InaSAFE plugin (see this blog post for more information ) which is an extremely useful tool for analysing data in the case of disaster, specifically in the case of flooding in Dar es Salaam.
Once you’re set up with QGIS, the following walkthrough will give you a guide to creating maps using QGIS. As an example, we’ll be using data from the Ramani Huria project and be creating a general map of the ward of Buguruni in Dar es Salaam.
Setting up QGIS to creating maps
- Download the Ramani Huria QGIS project found in our GitHub account page (under directory QGIS, then download the file ‘Dar es Salaam.zip’). As a side note, the map styles we use are based on the default OpenStreetMap appearance although adapted slightly to show additional details on features such as drainage, water network, building type, and landuse.
- Once downloaded, unzip the file ‘Dar es Salaam.zip’ and you should see seven files in the extracted folder
- Download the shapefiles for all of Dar es Salaam using the OSM Export Tool (a step-by-step guide to using this tool can be found here: How to: HOT’s OSM Export Tool).
- Once the shapefiles have been downloaded, copy them to the ‘shapefiles’ folder in the extracted ‘Dar es Salaam’ folder.
- Run QGIS and open the file ‘DarEsSalaam.qgs’ in the extracted ‘Dar es Salaam’ folder (you can open the file from QGIS or double clicking the file will open the software).
- Wait for a moment as the project is rendered in the map canvas of QGIS. When complete, you QGIS should look similar to the following screen:
Making a map in QGIS
For our walkthrough example, we’ll be making a general map for the ward of Buguruni in Dar es Salaam. By following these steps, you can create a highly sophisticated and details map, similar to those we provide to the wards in which we conduct our mapping.
- Ensure on the left hand panel of QGIS that the following layers are activated: Boundaries; Roads and buildings; Overview (map units); and Sea. These layers will all be included on the map.
- First we need to create a boundary for the ward. By doing this, Buguruni ward will stand out, with surrounding wards becoming faint – this allows it to be clear what section of Dar es Salaam the map is providing information on. Right click on ‘Boundaries’ and a number of options will appear. Select ‘Properties’ from the list of options.Navigate within the map by using using the left mouse button (or equivalent) to drag the map and zoom in or out by using the mouse wheel (or equivalent). As the shapefiles are large, you may experience some delay when navigating as the map is rendered.
- A window will pop up giving a number of styles to choose from. We will use a style already set, check ‘Buguruni’ and uncheck all remaining wards – this will ensure only Buguruni is displayed. Click ‘Apply’ and then ‘OK’ and the style will be applied. You can make new rules and styles for another ward if you know the osm_id for its boundary, this can be found by searching in OSM.
- You will be returned to the map canvas, displaying a clearer view of Buguruni. The next step is prepare the map for export and, if required, printing.
- The project downloaded from GitHub includes a number of composers, for this example select ‘Buguruni – General’ from the list of options.
- A new window will appear with the map of Buguruni appearing within the map template. This template includes items such as title; legend; and information about Ramani Huria. The box on the right hand side of the screen lists a number of ‘Items’ which can be unchecked, removing them from the map that will be exported. When creating maps we recommend you ensure your map is of high quality by having an accurate title, legend, and attribute whenever relevant.
- Use the tools in the menu bar on the left hand side of the screen to move the map around and position the area selected as required e.g. centered.
- When the map appears as desired, you’re ready to export. You can export as an image, PDF, or SVG file – we recommend PDF as this will also make it ready for printing if needed. Select ‘Composer’ from the menu bar and ‘Export as PDF’ from the drop down menu.
- A window will appear asking you where you wish to save the map and the file name.
Congratulations, you have now created a map in QGIS!