Practical No.: 3: Chetna S. Suthar
Practical No.: 3: Chetna S. Suthar
Practical No.: 3
Aim: Making a map, working with attributes, importing csv, installing plugins, searching and
downloading OpenStreetMap data.
A. Making a Map.
1. Download and extract the Natural Earth Quick Start Kit data. Open QGIS. Click on File ‣
Open Project.
2. Browse to the directory when we had extracted the natural earth data. We should see a
file named Natural_Earth_quick_start_for_QGIS.qgs. This is the project file that contains
styled layers in QGIS Document format. Click Open.
3. We would see a lot of layers in the table of content and a styled World map in the QGIS
canvas. If we see errors displayed at the top of the canvas, click on the cross to close it.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
If name of places are not deplayed just open property window of ne_10m_populated_places
layer and under Labels tab check the checkbox of Label this layer with and from the dropdown
list select Name.
4. In this tutorial, we will make a map of Japan. Click the Zoom In button and draw a
rectangle around Japan to zoom to the area.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
5. We can turn off some map layers for data that we do not need for this map. Un-check
the box next to 10m_geography_marine_polys and 10m_admin_0_map_units layers.
Before we make a map suitable for printing, we need to choose an appropriate
projection. This dataset comes in Geographic Coordinate System (GCS) where the units
are degrees. This is not appropriate for a map where we want the distances to be in
kilometers or miles. We need to use a Projected Coordinate System that minimizes
distortions for our region of interest and has units in meters. Universal Transverse
Mercator (UTM) is a decent choice for a projected coordinate system. It is also global, so
it’s a good default that we can rely on and choose a UTM zone that contains our area of
interest to minimize distortions for our region. In our case, we will use UTM Zone 54N.
Click the CRS Status button at the bottom-right of the QGIS window or click on Project
Project Properties….
6. Check the Enable on-the-fly CRS Transformation box. Type Tokyo utm zone54n in
the Filter search box. Once we see the results, select Tokyo / UTM Zone 54N -
EPSG:3095. Click Apply.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
7. Now we can start to assemble our map. Go to Project ‣ New Print Composer.
8. We will be prompted to enter a title for the composer. You can leave it empty and
click Ok.
Note
Leaving the composer name empty will assign a default name such as Composer 1.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
10. In the Print Composer window, click on Zoom full to display the full extent of the Layout.
Now we would have to bring the map view that we see in the QGIS Canvas to the
composer. Go to Layout ‣ Add Map.
11. Once the Add Map button is active, hold the left mouse button and drag a rectangle
where we want to insert the map.
12. We will see that the rectangle window will be rendered with the map from the main
QGIS canvas. The rendered map may not be covering the full extent of our interest area.
Select Layout ‣ Move item content to pan the map in the window and center it in the
composer.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
13. Let us adjust the zoom level for the given map. Click on the Item Properties tab and
enter 7000000 for Scale value.
14. Now we will add a map inset that shows a zoomed in view for the Tokyo area. Before we
make any changes to the layers in the main QGIS window, check the Lock layers for map
item and Lock layer styles for map item boxes. This will ensure that if we turn off some
layers or change their styles, this view will not change.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
15. Switch to the main QGIS window. Use the Zoom In button to zoom to the area around
Tokyo.
16. We are now ready to add the map inset. Switch the Print Composer window. Go
to Layout ‣ Add Map.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
18. Drag a rectangle at the place where we want to add the map inset. We will now notice
that we have 2 map objects in the Print Composer. When making changes, make sure
we have the correct map selected. Select the Map 1 object that we just added from
the Items panel. Select the Item properties tab. Scroll down to the Frame panel and
check the box next to it. We can change the color and thickness of the frame border so
it is easy to distinguish against the map background.
19. One neat feature of the Print Composer is that it can automatically highlight the area
from the main map which is represented in our inset. Select the Map 0 object from
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
the Items panel. In the Item properties tab, scroll down to the Overviews section. Click
the Add a new overview button.
20. Select Map 1 as the Map Frame. What this is telling the Print Composer is that it must
highlight our current object Map 0 with the extent of the map shown in
the Map 1 object.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
21. Now that we have the map inset ready, we will add a grid and zebra border to the main
map. Select the Map 0 object from the Items panel. In the Item properties tab, scroll
down to the Grids section. Click the Add a new grid button.
22. By default, the grid lines use the same units and projections as the currently selected
map projections. However, it is more common and useful to display grid lines in
degrees. We can select a different CRS for the grid. Click on the change… button next
to CRS.
23. In the Coordinate Reference System Selector dialog, enter 4326 in the Filter box. From
the results, select the WGS84 EPSG:4326 as the CRS. Click OK.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
24. Select the Interval values as 5 degrees in both X and Y direction. We can adjust
the Offset to change where the grid lines appear.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
25. Scroll down to the Grid frame section and select a frame style that suits our map. Also
check the Draw coordinates box.
26. Adjust the Distance to map frame till the coordinates are legible. Change the Coordinate
precision to 2 so the coordinates are displayed only up to the two decimal.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
27. Now we will add a North Arrow to the map. The Print Composer comes with a nice
collection of map-related images - including many types of North Arrows. Click Layout ‣
Add Image.
28. Holding left mouse button, draw a rectangle on the top-right corner of the map canvas.
On the right-hand panel, click on the Item Properties tab and expand the Search
directories section and select any North Arrow image.
29. Now we will add a scale bar. Click on Layout ‣ Add Scalebar.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
30. Click on the layout where we want the scalebar to appear. In the Item Properties tab,
make sure we have chosen the correct map element for which to display the scalebar.
Choose the Style that fit our requirement. In the Segments panel, we can adjust the
number of segments and their size.
32. Click on the map and draw a box where the label should be. In the Item Properties tab,
expand the Label section and enter the text as shown below. We can enter the text as
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
HTML as well. Check the box Render as Html so the composer will interpret the HTML
tags.
<div align=center>
<h1>Map of Japan</h1>
</div>
34. Once we are done with the map, we can export it as Image, PDF or SVG. For this tutorial,
we will export it as an image. Click Composer ‣ Export as Image.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
C. Using Plugins
1. Core plugins are already part of the standard QGIS installation. To use these, just enable
them
2. Open QGIS. Click on Plugins → Manage and Install Plugins....
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
3. To enable a plugin, check on the checkbox next to Plugin. This will enable the plugin to
use it.
4. External plugins are available in the QGIS Plugins Repository and need to be installed by
the users before using them.
5. Before starting with installation of plugin go to Setting tab and check the following
check box.
6. Click on Not Installed or Install from ZIP. And search for “OpenLayers Plugin” and install
it, if it is not installed already. Similarly, install “OSM place search” plugin.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
7. Once the plugin is downloaded and installed, we will see a confirmation dialog or we can
check in installed tab.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
2. A World map will appear on screen. If an error occurs in loading maps, go to project
properties → CRS →
3. In OSM Place search Pane → Enter Mumbai or any other place name to search.
4. Double click on the desired place in OSM Place search Panel or click on ZOOM button.
Chetna S. Suthar
Principles of Geographic Information Systems TYBSc (IT), Sem - VI
Chetna S. Suthar