Lab 5
Lab 5
In this lab, you will make a map that highlights the historic pubs in London’s Square Mile (aka the City of London)
that is inspired by this map:
1
Unzip/extract the .zip files to your lab 5 data folder. You can delete the .zip files when they have
finished extracting.
2. Add the three shapefiles to your map, starting with SquareMile.shp. Then add dlua_regions.shp and
gis_osm_buildings_a_free_1.shp.
Check the bottom-right corner of the screen. If it says EPSG: 27700, that's the British National
Grid, and is the CRS that we want. If, however, it says EPSG: 4326, you’ll need to change the CRS
to EPSG: 27700.
4. Add the OldPubs.geojson file to your map by dragging it from the Browser panel and dropping it onto
your map.
5. Because you are going to edit the OldPubs layer later in this lab, you need to save it in a shapefile
format.
Right-click on OldPubs in the Layers panel and select Export > Save Features As…
o Format: ESRI Shapefile
o File name: OldPubs Use the … button to browse to your Lab 5 folder and save it there
o CRS: EPSG 4326 (WGS 84)
o OK
The new OldPubs layer should appear on your map (it is likely the top-most layer).
Remove the OldPubs.geojson file from the map (you can hover over the file name in the Layers
list to confirm it’s the correct one). Right-click>Remove), we don't need it anymore.
6. Arrange your layers in the correct order in the Layers Panel. They should all be visible and should
appear in this order:
OldPubs [.shp format, not the .geojson]
SquareMile
buildings
dlua_regions
If you have a palette that you created in Pre-Lab 5 that you like, you may use that one. Otherwise, go to
https://colorkit.co/ (or another palette generator of your choice) and follow the directions in the pre-lab to
2
generate a new color scheme for this map. You only need one palette for the map, but you will need a
complementary color for the icons later.
8. Right-click on SquareMile in the Layers panel and select ‘Zoom to Layer’. This should make the Square
Mile shape fill the map window. Make the SquareMile layer invisible (turn it off) for now.
9. Change the fill color of the layers, using the options from your generated palette:
dlua_regions should be dark
buildings should be the lightest shade (of these three layers), but it should not be too light or
you may have trouble seeing the pub labels later in the lab.
The project background, which gives color to the river, should be a medium value in between
dlua_regions and buildings.
o To change color of the project background, go to Project > Project Properties > General
o See below for an example (but don’t use this exact color scheme):
10. Next, the symbology of the SquareMile layer should be changed. Turn this layer back on. We want to
use this polygon to frame or highlight our area of interest. To accomplish this, we’ll use an inverted
shapeburst fill:
Open the properties menu for the SquareMile and go to Symbology
o Where it says "Single Symbol" at the top, click the drop-down arrow and choose
Inverted polygons
o Under Gradient Colors, select Two color. Change the first color to white and the second
to no color/transparent (i.e. 0% opacity).
3
o Under Shading Style, click Set distance, and change it to 20 millimeters.
Increase the Blur strength to 10
o Click OK
These will be the initial settings for this layer. Later, you may come back and adjust some of
these settings as appropriate for your layout.
12. Go to mapicons.mapsmarker.com.
…go to Restaurants & Hotels > Bars, and click on the icon for ‘Bar’.
You should see a list of keywords associated with this icon, and below that, information about
how the icons may be used, and how you should cite them on your map (or in a final project).
o You may wish to copy down the license information now so that you don’t need to look
it up again later.
If you scroll down far enough, you should see the bar icons in a variety of options:
You can download any (or all) of the eight icons above by right-clicking and saving them to your
lab folder (or you can save them to a general Icons folder in your GEG 131 folder). However, the
default icon color probably doesn’t go with your map. You should change this before
downloading the icon(s).
Below the icons, you will see a menu that will let you generate the icons in the color of your
choice. You can use the color slider, or enter RGB/HSB/HTML(Hex) values into the boxes. You
should choose a color that stands out against your map, so you should make your icons a
complementary color of what you selected for your map.
4
When you are done, click the Generate button, and the icons will re-load in the new color.
It is up to you which icon you use on your map, but it should be easy to see the icon and tell that
it is a beer mug. Not all eight icons will be appropriate for your map, and some work better than
others. I recommend downloading at least three of the options (light on dark, dark on light, and
the mug with no background) to try on your map.
Before you leave the website, take a few minutes to look at what else is available. You may
need to download more icons for future maps.
13. Back in QGIS, open the Properties for the OldPubs layer.
Click on the Simple marker to open the properties for the simple marker symbol
Click the Symbol layer type drop-down menu and choose: Raster Image Marker
14. Click the ellipses button […] next to the blank filepath box, and browse to the folder where you saved
your bar icons format. Select one of the icons.
15. You will probably need to adjust the symbol size. They should be prominent and very visible on your
map, but don’t make them so big that they overlap each other.
16. You should change the anchor point from VCenter to Bottom so that the tip of the symbol actually
points to the pub location, instead of being centered over it:
5
VCenter Bottom
17. You can add additional effects to your icons, such as a drop shadow, by checking the Draw effects box,
and then clicking the star button.
It is okay if you decide not to use the effects (you can uncheck the draw effects box to turn them off),
but keep these options in mind for the future. You may want to use them on another map.
18. Evaluate how the icons look on the map. Is there enough contrast against the background? Do you like
how the colors go together? Do you need to adjust the brightness of the Buildings layer? Do you want a
different icon? If you don’t like how something looks, or if you don’t like the icon that you chose, go
back and make any changes needed.
20. First, set the scale of the map in the map window so that it is the same as the scale will be in the print
layout: 1:12,000. Remember, the labels are dynamic and will adjust when the scale changes (something
we don’t want to happen if we can help it).
21. Lock the map scale at the bottom of the map window.
22. Depending on your settings, you may need to adjust the pub icon size. Remember, the icons should be
big enough to be easily seen at this scale, but not so large that they overlap (note: a tiny amount of
overlap may be okay for the three that are clustered together).
23. Open the Layer Properties for OldPubs, and click the Labels tab.
Select ‘Single labels’ from the drop-down box at the top.
6
Click the expression button next to the Value box . Delete the value that is already in the
box. Then enter the expression in the box exactly* as seen below:
name || '\n(est.' || Establishd || ')'
*For your convenience, if you can’t copy/paste from this .pdf, there is a .txt file in the Lab 5
folder on Brightspace that contains this code. You can copy the text from there and paste it into
the box so that there are no typos.
This expression will generate a label with the pub name on one line, and the established date in
parenthesis on a second line. You’ll know that you entered the expression correctly if the
output preview at the bottom of the expression window looks like this:
Change the font to something that fits with the overall look and feel of your map, but is still
readable (not too decorative or fancy). It is also not a good idea to use a very wide font, as you
may have trouble making all of the labels fit on your map. A narrow or condensed font may yield
better results. You will need to experiment.
Change the text color to white (or another color if white is not easily readable on your map).
Change the text size to something appropriate. The size you choose will be somewhat
dependent on the typeface you are using, but you might start with 12 and then adjust up or
down as needed later.
In the Formatting menu, change the Alignment to Center. Then, adjust the Line Height so that
there is not a lot of space between the name and date. For example, 80% often looks better
than 100%. Be careful though, you don’t want the letters to overlap.
Press OK or Apply to see the changes. The labels should appear, but they are probably not in the
best location. You will fix this in a later step.
Drop shadow:
o If you gave your icons a drop shadow, your labels should also have a drop shadow. Go
to the Labels tab > Shadow section and check the box next to Draw drop shadow
Wrap the text (Recommended, but optional. It can make the labels more compact (see examples
below).):
o In the Labels tab > Formatting
7
o Wrap on character: put in a space (hit the spacebar once) in the box to make the lines
break on a space.
o Or Wrap lines to a Maximum line length (enter a number of characters in the box).
Delete the space from the Wrap on character box if you do this though.
Evaluate how your labels look at this point (aside from the placement). Pay particular attention to the contrast
of the labels against the background (if there is not enough contrast, then you may need to make the buildings
layer darker). This is one of the major things that I look for when grading this lab. The map viewer should be
able to easily see the labels. I can provide feedback on this if you send me a screenshot.
Once you are happy with the font settings and contrast, you can work on fixing the label placement. Depending
on your settings, you may notice that some of the labels currently overlap the icons. This is not a good place for
the labels to be.
25. In the Labels tab, select Placement > Offset from point, and click the box underneath the point, in the
center on the quadrant diagram:
Click apply.
The text is now centered below the icons, which seems to work well for the labels on this map. However, some
of the labels disappeared! This is because some of the points are close together, which means that their labels
would also overlap. QGIS will not draw labels if there are overlap conflicts (we’ve seen this issue before on the
coffee shops map (pre-lab 3) and also with the country names in Lab 3). To fix this, you could make your text
very small, so that they don’t overlap, but then you wouldn’t be able to read them.
It would be nice if you could just pick up and move the labels to where you want them to be. Luckily, you can do
this in QGIS!
26. In the OldPubs Labels tab, select Placement, and change it to ‘Around point’. This should bring back the
missing labels so that all 10 are visible (the next steps are much easier if you can see all of your labels).
8
How to use the label toolbar to move labels:
1) Make sure that the Label toolbar is turned on:
a. View > Toolbars > Label toolbar (should have a check next to it)
The Label toolbar uses data defined options for label placement (similar to what we used in Lab 4).
Because it creates custom fields in which to store data, it will permanently alter your dataset. This is
okay for today’s lab, but important to understand if you use this method in the future, because you may
wish to create a copy of your dataset first.
2) Make sure that your scale is still locked at 1:12,000 before proceeding. If it is not, you will need to
change the scale, lock it, and then possibly adjust your label settings if they do not look right at this scale.
Once locked, it’s okay to zoom in/out, as that should only change the magnifier.
And then click once on the label that you want to move. This option needs to use a column from the
attribute table that contains unique values. Typically, that is some sort of ID number or name. Select
either idno or name as the Primary Key (all of the names are unique in this layer, so it’s okay).
A green box will appear around the text of the label (if it does not, you may need to click on it again),
and a red dot will appear under the icon that matches the label, which is useful if you aren’t sure which
label goes with which pub. Move the green box to where you want the label to appear, then click once
again. As demonstrated in the video, if any label inadvertently disappears after you move it, it is
probably in conflict with another label.
Note: the best placement for these labels is centered below the pub icon. As many labels as possible
should have this placement. Depending on your font settings, you should be able to get at least 6 into
this placement. The remaining labels should be in a logical position, such as centered above, or off to
the side. When you are done, it should be easy to tell at a glance which labels go where. The labels
should not overlap the icon itself, nor should there be a large gap between the icon and the label (a
small space is okay).
If you are having difficulty getting everything to fit, you may need to go back and adjust
the font, size, wrapping, etc. to figure out what works best for your map.
9
30. Add the map to the page, but leave a thin, uniform, background-colored margin around the map as a
border:
31. Set the map scale in the layout to 12,000 (in the Item properties tab), and use the Move item content
button to adjust the placement of the Square Mile portion of your map if needed. It should be roughly
center, but it does not need to be exactly centered on the page. You want to make sure you leave
enough room in the top left corner for the title, and also at the bottom for the required information.
If any part of the Square Mile is cut off at this scale, you probably didn’t make the border thin
enough. It’s okay if some of the white shapeburst is cut off.
32. Add a title in the top left corner at an angle: Ye Olde Pubs of London’s Square Mile
Font, size, color, etc. are up to you. It is okay for your title, or part of it, to be more decorative
than the rest of your map text.
o If you click on the font under Appearance, you have access to most of the same
formatting, buffer, and drop shadow options as you did when designing your labels.
The title should be rotated to fit in the corner. This option is found in the Item properties tab.
The text should be roughly parallel with the border of the square mile polygon
Below is the example map title that this lab was inspired by. Notice that the font size varies, and
the space between the lines is reduced (possibly too much). This is a good way to fit a lot of text
into a small space. This effect is most easily replicated by using multiple text boxes.
Note: while it is okay for typeface, size, and color to vary for emphasis, the rotation of all text in
your title should probably be the same.
33. At this point, I want you to evaluate your layout and make any needed changes. Look at the contrast
and the visual hierarchy as it is right now. You should notice the icons and their labels, and the title. If
your background is too dominant, this info can get lost. If you want to make changes to the Inverted
polygon (the Square Mile layer) settings, feel free to do so (the settings are in step #10).
For example, you may want to change the Set distance (increase or decrease from 20), or you
may want to change the layer opacity to tone down the white. Alternatively, you could
10
experiment with using a darker shade from your palette instead of white. It depends on what
effect you are going for.
vs.
Whatever you do, make thoughtful, intentional choices. Also, you don’t want to lose the focus
on the area inside the square mile.
You may need to click the refresh button in the Layout to see the changes that you have made
to the map.
34. Add an asterisk to the end of the Old Bengal Bar label:
The easiest way to do this is to edit the name in the attribute table, as you did in Lab 4 (click the
pencil button to turn on/off editing for the OldPubs layer). Make sure to save and turn off
editing before going back to the Layout.
You may need to re-position this label on your map after editing it.
35. Why the asterisk? The Old Bengal Bar has an established date of 2010, which doesn’t seem to fit with
the Old Pub theme. If you look at the attribute table, in the notes column it mentions that the bar is ‘In
an 18th century warehouse’. Therefore, you should add the following text to your map (in a logical place
for minor, informational text):
*Located in an eighteenth century warehouse
36. Add your name, GEG 131 – Lab 5, and the date somewhere on the map (but not in the thin margin).
Also add the source(s) of the data that was used, and the CRS information (typically the full name is
given, EPSG info is optional).
The font, color, size, and placement of this information should work with the theme of your map
and not look out of place. It should also be among the smallest text on your map. Keep the
visual hierarchy in mind when designing and placing this text.
The information has to be readable, so keep that in mind as well. Sometimes a rectangle or
semi-opaque rectangle can be placed underneath text to improve its readability (tip: a solid
white background is likely going to be too visually dominant, don’t forget to use your palette of
colors).
37. If you feel that additional items are needed (such as text that explains that these are historic pubs, more
than 100yrs old…), feel free to add them. However, make sure that these items add to your overall
design rather than detract from it, otherwise points may be deducted.
38. Save your project one last time and then export your layout to a .pdf. Make sure to review the .pdf.
11
Submission details:
Submit a .pdf of your map and the map report to the Lab 5 dropbox on Brightspace.
12
Lab 5 Map Evaluation Checklist
The map report is worth 5 points, the map is worth 15 points.
General [2pts]:
Name, GEG 131 – Lab #, and Date are included
The CRS/projection is as requested
The map scale is appropriate for the data and for what is being depicted
There is text explaining the projection
There is text explaining the data source
Format [1pts]:
The lab was received in the format requested
The paper size is correct (ANSI A unless otherwise indicated)
The orientation (portrait/landscape) is appropriate
Layout [2pts]:
Available space is used appropriately
All items and parts of the layout appear on the page
Layout feels balanced
Layout uses a correct visual hierarchy
Margin is uniform, of an appropriate size
13