Earlier, as covered in this post, I discovered how to work with the QGIS program to build and edit maps. However, knowing how to change fonts and colors isn’t worth much without knowing how to create files that contain the map layers such as rivers or roads that had been pre-made for that earlier lesson. This post demonstrates how these shapefiles are created, again using a tutorial from the programming historian.

This project starts where the last QGIS one left off, with the map of Prince Edward Island. Because the new map going to be created looks at some differences over time, the first thing was inserting another historical map as another raster layer, this was done just as before. The new part is in creating three new vector layers, each of a different type. 

The basic steps for each are the same: 

1. In the menu bar, go to layer > Create Layer > New Shapefile Layer

2. In resulting “New Shapefile Layer” window: 

a. instead of simply typing in a file name in the box so labelled, click the ellipsis button next to it to not only name the new shapefile, but tell the computer where to save it.

b. set the CRS to match that of the layers you already have.

c. select the “geometry type” (dependent on the type of data that layer is to contain – points for things like towns, lines for roads or rivers, and polygons for things like regions or lakes.)

setting geometry type

d. add attribute fields – the type of and label of information you want linked to each point, line, polygon, etc. 

3. toggle editing and add points, lines, etc., finishing each with a right click which opens a box to add information to the attributes mentioned above in 2.d.

The first shapefile we create is the “points” type and will pinpoint cities and settlements, some of which no longer exist. The attributes here were settlement name, year (established), and end year (for those settlements no longer existing, when they ceased to exist). By default, new attributes are “text” unless otherwise specified, so for year and end year, whole number was selected as shown. 

Then, toggling editing on and selecting add point, one merely clicks where a settlement is/was, aided by the historical map rasters already in place, and fills in the name and year(s) attribute information in the box that pops up.

toggling editing

The second shapefile is to show historical roads and thus uses “line” geometry type. Here the attributes include name of road and year, again changing year to whole number input. 

setting type to whole number when adding attribute fields.

After turning on editing, and selecting add line, one places dots along where a road is, tracing roads from the historical map raster, right clicking at the end, which cues the attribute box to appear wherein name and year can be entered.

The third shapefile is to show the lots or districts the island is organized into, allowing us to use the polygon geometry type. Attributes are lot name and year. For rectangular lots, adding an item to the shapefile only requires clicking each of the four corners of the lot after toggling editing and selecting add polygon. 

Non rectangular areas are captured using “snapping” which is only a little more involved. First, I had to find the snapping toolbar, click the magnet to enable snapping, and go into the snapping options.

To be as accurate as possible, this snapping was done with reference to the modern coastline layer, changing the settings as described in the lesson. After closing the settings window, the new polygon is added much as the last one, only using more clicks to trace around the coastline.

showing the vertices of lot 38

Again, ending with a right click opens the attribute box and the polygon with its information becomes part of the shapefile. All the shapefiles created are saved wherever specified in step 2.a. for future use.

Skip to content