Georeferencing (registering) a map in a Lambert projection

This is a procedure that came up in a discussion with a friend, and I think it is tricky enough to be worth recording here.

Specifically we are using QGIS 3 to georeference a 1941 map of the Odessa, Ukraine, area, one of the 1:1,000,000 International Map of the World Series.

Odessa 1941 reducedThis map is bounded by latitudes 46° and 51° north, and longitudes 27° and 36° east.

We want as little loss of image quality as possible, therefore we want to avoid warping (re-projection). If warping the map were not a concern, we could georeference it in a geographic projection (e.g., EPSG 4326 or 4267) with a few ground control points (GCPs) in degrees, using the intersections of latitude and longitude lines.  But in this case we need to georeference it in the original Lambert projection, as it was printed. The transformation will be “linear” and in fact only a world file will be written. The world file will enable QGIS to read in the map image without warping it.

This will not be possible unless we can figure out what the original projection was. Fortunately at the bottom of the map the person who did the scanning has left the statement of projection.

projection text

A Lambert conic projection usually relies on four parameters. There are the two parallels of latitude at which the cone touches the globe: these are the two numbers listed here: 36° north and 52° 48′ (52.8°) north. They will be called lat_1 and lat_2 in the projection definition.

Then there are the coordinates of the origin point of the projection: lon_0 and lat_0. The meridian that runs straight down through the centre of the map is clearly the central meridian of the projection, because it runs perfectly vertically, the only longitude line that does so on the map. The centre of the map falls halfway between longitudes 31 and 32, so lon_0 is 31.5°.

Lat_0 is a little harder to figure out. However, in my experience it doesn’t really matter what you choose for lat_0. I chose 40° north.

The first step then is to create a new CRS (coordinate reference system) in QGIS for this Lambert Conic projection. We go Settings>Custom Projections, and click the “+” button to add a new CRS.

new CRS

Plugging in our parameters we determined above into the normal Lambert Conic definition, we get this:

+proj=lcc +lat_1=36 +lat_2=52.8 +lat_0=40 +lon_0=31.5 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs

QGIS will assign an EPSG number for your new CRS. In this case I got 100030, but they are always different (and greater than 100000).

The next step is for me to put my main map window in QGIS into the new projection, and open an array of latitude and longitude lines, such as the Natural Earth 1:10 million scale one-degree graticule layer. And I turn on labels for these lines so I can see what degrees I am looking at.

display graticule in custom projection

The reason I do this bears directly on the central technique we are going to use here. Because the original map is in Lambert, and I want to register it in Lambert, I will have to enter Lambert coordinates for each of the GCPs. But looking at the map I only see degrees: I don’t see Lambert coordinates.  Fortunately QGIS can tell me what the Lambert coordinates are for each grid intersection, as long as I am displaying my grid in the same CRS as I want to use to register the map. You can witness this by zooming in on and hovering your mouse over a grid intersection and looking at the Coordinate text box in the bottom margin.

noting Lambert coordiantes

There are the Lambert coordinates—at least for this specific Lambert Conic projection we are using—for 46° north, 26° east: -421460 metres east, 674061 metres north.

We don’t need to write these down though. We will get them assigned to the map image in a more elegant way.

Now it’s time to open the georeferencer (Raster>Georeferencer) and bring in the map image. Immediately you will be asked which CRS you want to georeference this map in. Choose the custom CRS you just made (in my case, 100030).

image read in

Before you place GCPs, go to the settings of the georeferencer and set up your transformation parameters to ensure no warp will result.

transformation settings

You want transformation type to be Linear. The resampling method is not important because no resampling should occur. The target SRS is your custom CRS. And you have checked the box called Create world file only (linear transform). (I also like to check the Load in QGIS when done box.)

Note that in the georeferencer the bottom line now looks like this:

georef parameters on status line

I’m going to place the first GCP in the lower left corner (the southwest corner), which is 46° north, 27° east. Before I do this, I go into the main map window and zoom in on just that intersection, to a fairly large scale, say 1:10,000.

Now in the georeferencer I place my GCP point on 46° north, 27° east, and QGIS asks me for the X and Y of that point. Or, I can click From map canvas.

first GCP

Once I click From map canvas, the georeferencer is hidden, the cursor becomes a cross, and I am invited to pick that same point on the main map canvas. I carefully click right on the intersection of 46° north and 27° east, and immediately the Lambert coordinates of that point as filled in for me in the dialogue box:

lambert coordinates transferred

I click OK, and I’m ready to do my next GCP. Remember, the first thing I will do is pan the main map to the coordinate intersection where I’m about to add this second GCP.

A linear transformation never requires more than three GCPs, but I like to do four so I get an estimate of my error. I do the four corners of the map.

At this point I can see, from the GCP table at the bottom of the georeferencer, how my error is.

GCPs created

The residual looks like 3 to 5 pixels, and the mean error is 6.5 pixels, quite acceptable in this image which is 4700 x 5700 pixels.

Now I hit the Start Georeferencing button (green triangle “play” button) and a world file is written. Because I’ve checked Load in QGIS when done, I immediately get asked for the CRS of the new georeferenced map, and again I select the new custom CRS I created for this map.

The map appears in the main map window, and I drag it under the graticule layer, to see that it is properly georeferenced.

map georeffed

There is no new raster image with this linear transformation, just a small text file with the same name as the map and a .WLD extension.

To clip off the collar of the georeferenced map, in case I want to mosaic it with adjacent maps, I can create a polygon in a temporary layer that covers the part of the map I want to keep…

ready to clip 0


and then do Raster>Extraction>Clip raster by mask layer. I like to check Create an output alpha band and Keep resolution of output raster.

ready to clip

And the result is a clipped raster with transparency in band 4.

clip finished



Octagons in Baku

Besides the window in the Divankhana, I saw a lot of geometric design in Baku based around octagons.

For example, consider this pattern in a window in the external courtyard wall at Baku’s Taza Pir mosque.


This beautiful pattern, with its eight-pointed stars set within octagons, turns up on plate 67 in Jules Bourgoin’s 1879 Les Éléments de L’Art Arabe (which you can download from

Bourgoin plate 67 3x3

It’s wallpaper group is the fairly common *442 (p4m) and it is generated by tessellating a square cell.

Bourgoin plate 67 single tileConstruction of this pattern is straightforward. The eight-pointed star in the centre is inscribed in a circle whose radius is one quarter the side of the square. The vertices of the octagon are found by extending the sides of the star. The rest of the construction lines are extensions of the octagon sides, and lines connecting star dimples that are three apart.


bourgoin pattern 67 construction lines

But one enters the Taza Pir compound via a stairway from the street. The panels in the stairwell are related, but subtly different from the window design!


Seen head-on…

taza pit entryway pattern 4-tileWhat did they do here?  There is the same eight-pointed star in the centre, and the same enclosing octagon, but in this case they’ve trimmed back,  to the borders of the octagon, the square that one repeats.

taza pit entryway pattern square2

As a result, the square tile borders stand out strongly as lines, and around each point where four tiles meet we get a big diamond holding four small diamonds.

taza pit entryway pattern 12-tile

(This also belongs to the *442 wallpaper group.)

Now, in the Old City, I came across a piece of octagon-based decoration that illustrates what happens if one doesn’t follow best practices, as explained by Eric Broug.  This pattern involves starting with the same pattern as in the Taza Pir windows (above; a.k.a. Bourgoin’s Plate 67), but then repeating a somewhat random subset of it. In other words, incorrect tessellation.


It would appear that the manufacturer of these pre-cast concrete blocks selected a piece out of the overall pattern that was not the all-important basic square, but rather a rectangle.

subset taken for pre-cast

Hence each of the concrete blocks looks like this:

single block

When you put them together, lines match up, but the effect of the original design is lost.

tiled pattern

The wallpaper group of this pattern would be*2222 (pmm).

Elsewhere in the Old City, there were pre-cast patterns that did tessellate pleasingly, again with octagons.


But back at the Taza Pir mosque, I spotted this on an adjacent building, which I believe is Baku Islamic University:

Taza Pir

The grill pattern is octagons packed together, with squares in between; and eight radial lines emanating from the centre of each octagon. It’s basically the central column of this pattern:

Taza Pir end pattern

But look at what they did in the point of the arch. It’s beyond my knowledge to know whether this is best practice or not, but it is definitely creative.




A window in the Divankhana, Baku

Eric Broug, from the School of Islamic Geometric Design, writes that sometimes while travelling he sees a piece of contemporary Islamic geometric design and recognizes it as, well, let’s say less than best practice. (He sometimes posts images of this sort of thing on Instagram under the hashtag #cpigd, which stands for Common Problems in Islamic Geometric Design.)

What sort of mistakes are they? He explains on his page on best practices, but to me the most common one is incorrect tessellation, where a block of pattern is repeated in ways that cause lines to abruptly stop instead of continuing on.

I thought it would be interesting to take a look at the designs I found in Azerbaijan, in the cases where they were identifiably Islamic, and ask the same question: are they examples of good, traditional design.

So, bearing that in mind, let’s look at a grill window I found in the Divankhana of the Palace of the Shirvanshahs in Baku, Azerbaijan.

The Palace of the Shirvanshahs is the premier piece of historical architecture in the Old City of Baku, or, as it’s called in Azerbaijani, İçərişəhər or Icheri Sheher. The original buildings have been deduced to date from the 15th century, but most of the palace was heavily renovated/restored in the 20th century so it’s not immediately clear whether the details one sees are original or the work of a restorer.

The Divankhana (which is also variously called the Divan-Khane or Divanhane) is a structure in its own courtyard just off the outer courtyard of the palace. It holds a pleasing octagonal pavilion. whose original function is unknown (there are many theories). The pavilion is domed and consequently two stories in height, so it stands above the courtyard wall and can be seen from the palace courtyard. In one corner of the Divankhana, there is a staircase leading up to a locked door on the upper storey of the pavilion.

This window is at the top of that staircase, and looks out into the palace’s outer courtyard. Here it is seen from inside.

centre divankhana window from inside

What I thought when I saw this is There’s no way this can be a best practices design. There were so many wacky elements that I had never seen in an Islamic geometric design before. For one, I couldn’t find a single axis of reflection in it, anywhere. For another, it contained a number of strange, three-way intersections.

Is it a bad design, perhaps a modern artist not working within traditional lines, or could this be authentic traditional design?

Let’s look at how the pattern works.

The whole pattern begins with a pair of adjacent large octagons.

basic octagons

These fill the window, as shown.

Centred on the vertices of each octagon are eight smaller octagons, sized so that when they overlap they bisect each other’s sides.

secondary octagons full

As you might design it on paper

secondary octagons

Clipped to the window opening

These circles of smaller octagons define an empty space in the centre of each of the larger octagons, a space which is an eight-pointed star.

So far, so good, and very symmetrical and, in fact, infinitely tile-able. The cleverness comes with what they did inside each 8-pointed star.

They divided this space with a four-armed pattern which has rotational symmetry but no mirror symmetry.

They ran it in opposite directions in the top and bottom halves of the window. So, looking from inside the window, there is a counter-clockwise star in the top half and a clockwise star in the bottom half.


counterclockwise star

Counter-clockwise star

clockwise star

Clockwise star

stars full windowed

Full pattern

This is fairly mind-boggling for traditional Islamic design — I think. (I’m no expert.) The little pattern of four “hammerhead” shapes that circles within each 8-pointed star looks more M. C. Escher than standard geometric design.

Mathematically, we might ask: does this pattern at least pass the test of being able to be  continued in all directions?

Well, yes. One would simply add more big octagons above, below and to the sides, and then add the smaller octagons, etc. This could go on forever.


Each big octagon hosts an eight-pointed star in its centre. If you alternate big octagons that host clockwise stars with big octagons that host counter-clockwise stars, following a checkerboard-like pattern, the centre of each star would be a four-fold centre of rotation. The corners where four octagon tiles come together are two-fold centres of rotation. And there are axes of reflection along the lines where adjacent big octagons touch.


Axes of reflection in blue; four-fold centres of rotation as green squares; two-fold centres of rotation as red diamonds.

Patterns with these axes of reflection and pattern of rotational centres belong (mathematically) to the “wallpaper group” known in orbifold notation as 4*2, and in IUC notation as p4g. (There are seventeen possible wallpaper groups.) Patterns that are 4*2 have a “twist” to them so that the basic square unit of the pattern is not the same as its mirror image.

In fact, the fundamental tile for this pattern, a tile from which the entire pattern can be generated through reflection and rotation, is triangular.

fundamental tile4*2 is an unusual wallpaper group for an Islamic geometric design, most of which are *442 (p4m) or *632 (p6m). But it’s not unheard of, and would not lead us to conclude that this pattern doesn’t use best practices.

And, then it gets a little more complicated.

At the Palace of the Shirvanshahs I never shot a picture of the outside of the window, so when I got home I found that, while there’s no Google Street view in Azerbaijan, someone had conveniently taken a photosphere in the main courtyard of the palace four months before I was there.

Here, in the photosphere, is the facade of the Divankhana as seen from the outer courtyard. The Divankhana is the building with the whitish dome.

Photoshere image palace of Shirvanshahs

Here’s a close-up of the three window openings on its second floor:

all three windows

Only the central one is full-sized; the outer ones are reduced in height, and the left one is completely blocked. I was inside the rightmost window, and in this image we see it as the reverse of my original picture.

right window divankhana

But look at the centre window.

centre window grill Shirvanshah palace divankhana

The stars in this window turn the same way. They’re both counter-clockwise (as seen from outside).

This pattern group, incidentally, would be 442 (orbifold) or p4 (IUC); it has no axes of reflection and two kinds of centres of four-fold rotation. I have not seen an Islamic geometric design before in the 442 wallpaper group.

So the windows are not the same. Prompting some contemplation.

This reminded me of a #cpigd instagram posting by Eric Broug at

Design problems in Cairo. *All* the restored, replaced geometrical windows on *all* the restored buildings in this street in Darb al-Ahmar are identical. Originally, there would have been a great diversity of design.

This post prompted some pretty hot discussion in the comments about whether window patterns in a single building were traditionally uniform or not. Broug was of the opinion that

conventionally in Islamic Architecture, different patterns would be next to each other. possibly to encourage contemplation and reflection by looking for differences and similarities

At the Divankhana, the blocked and un-restored left-hand window suggests that this second storey of the Divankhana has not been aggressively restored, and that we’re not looking at recently restored windows here.

And I wonder if this subtle difference between the centre and right windows was an example of encouraging contemplation and reflection (no pun intended). It certainly got me contemplating.

Eight Maps of Tbilisi

Last month I went to Tbilisi, the capital of the Republic of Georgia. Before I went, the only map I had of the city was this inset on the 2007 (third) edition of ITMB’s Georgia. It covers the downtown area that most visitors are interested in: on the right bank of the Mtkvari river from the Metekhis Khidi (Metekhi Bridge) at the downstream end to Respublikis Moedani (Republic Square) at the upstream end.

ITMB Georgia inset of Tbilisi_small

There are many things I like about this map. It has a basic visual hierarchy: Rustaveli avenue is given extra width to show its importance, and the high-traffic roads are in yellow. Also, they’ve made an effort to use Georgian words (moedani, khidi, gamziri, kuča) for common features (square, bridge, avenue, street) — even though the transcription scheme is not what is recommended today (kuča would be written kucha). This is surprisingly rare: most maps, in fact every other map I encountered on this trip, translated those terms. But if you think about it, leaving them in Georgian, with a handy little table of geographical equivalents in the legend, has a distinct advantage. It immediately gets you started with a few words of vocabulary.

Now, this map is not detailed enough for finding your way around the old town, which is the tangle of curved streets near the Metekhis Khidi. For example, if you look near “Blue Bath,” you see a lot of generalized, unnamed streets.

ITMB Georgia inset of Tbilisi_old_town

Before I went then, I made myself a paper map from Open Street Map. I cruised around in OSM at zoom level 17, stamping out PDFs. I printed these out and then cut-and-taped them together. Besides being fun, it was an excellent way to familiarize myself with the city’s geography, and I highly recommend this exercise.

OSM 2018_detail

(Ignore the yellow highlighter on the map. That was just my way of keeping track of where I’d been.)

One thing that’s good about OSM is that it is generally in the local language. In the case of Tbilisi, the streets are mostly labelled in Georgian, and this gives you a reason to learn the Georgian alphabet – which in turn makes reading street signs easier. (If you would like the Georgian alphabet at hand while reading this post, the Wikipedia page on Georgian scripts is quite helpful. This is the mkhedruli script.)

But if you look closely there are also a surprising number of features labelled in other languages: there is some English, like “SIXT rent-a-car” or “The Statue of King Vakhtang Gorgasali.” There’s also some Russian (Храм Метехи). I guess this is the nature of volunteered geographic information. On the positive side, from this kind of thing you can deduce some things about who visits Tbilisi, and who’s interested in mapping it. Actually, in my two-week experience, Russian-speaking tourists in Georgia outnumbered those speaking English.

OSM 2018_detail2

According to the OSM wiki, zoom level 17 is roughly equivalent to 1:4,000 scale, making this the most detailed paper map you are likely to find. I found it very accurate, even the pedestrian streets (blue tinged) and the incredibly valuable pedestrian underpasses. It’s also quite up-to-date. For example, where ITMB had Leselidzis Kuča in 2007, the street has now been renamed to K’ot’e Apkhazis Kucha.

However, OSM can be quirky. The major Tavisuplebis Moedani (თავისუფლების მოედანი), or “Freedom Square,” is not labelled at all, although the monument in the middle of it (Tavisuphlebis Monumenti/თავისუფლების მონუმენტი) was labelled on my screen as I was looking at OSM. And that label disappeared in the export to PDF. A bit weird.

OSM screenshot and PDF compared, zoom level 17

The area around Tavisuphlebis Moedani/Freedom Square in OSM, zoom level 17, as seen in my browser (left, a screenshot) and in the PDF generated with Share>Image (right)

Once I had arrived in Tbilisi. I began hoovering up maps. The first one I got, since I was staying at the Envoy Hostel, was the Envoy hostel’s branded map. (“Envoy Hostel Tbilisi City Map”) I imagine this map turns up in many Tbilisi locations under different branding. It’s dated 2017 and a tiny note in the corner says it is made by “Saniday.”

Tbilisi Envoy hostel map Saniday detail_small

There are lots of good things to say about this free map. The streets are clean and mostly labelled. Points of interest are flagged, although many of these are just the establishments for eating, drinking and shopping that have sponsored the map. Most notably, they’ve picked up a couple of widenings in the streets which catch the eye as landmarks, and have named them, , like “Jerusalem Square” and “Meidan Square.”

Tbilisi Envoy hostel map Saniday detail2_small

I proceeded to Prospero’s Books on Rustaveli Avenue (a delightful bookstore) and bought three maps. I bought the Tbilisi City Miniguide and Map (undated with no publisher mentioned)…

Tbilisi City Miniguide and Map_small

the GeoLand Tbilisi City Map 2015…

GeoLand Tbilisi_small

and Tbilisi: A Walk Around Old City, by Idea Design Group (undated)….

Tbilisi, A Walk Around Old City_small

Let’s start with the Tbilisi City Miniguide and Map. If you look at the area between the Metekhi Bridge and the Peace (Mshvidobis) Bridge it’s apparent that this piece of cartography is a disaster.

Tbilisi City Miniguide and Map_detail

It’s just a spaghetti tangle of unlabelled streets. So we’re going to set this one aside as a scary map that you probably shouldn’t buy.

The next thing you might notice is that there’s a surprising similarity between OSM and Tbilisi: A Walk Around Old City. One might almost suspect they were made with the same geodata. The shapes of blocks are the same; building outlines are the same. (As a digression, can I just say that building outlines on city maps don’t really help us? They prove useful only when pedestrian walkways go between them. Otherwise they create clutter.)

OSM Guide Old City compared

OSM (left) and Tbilisi: A Walk Around Old City (right) compared.

I have to credit GeoLand for resisting the urge to put little 3D rendering of buildings on their map. These are great for helping you recognize which building is the opera house, but they obscure too many streets beneath them. (GeoLand, I should note, are the masters of mapping in Georgia. They have produced the regional maps you are likely to pick up at visitors centres, and it is some very nice cartography.) I also like GeoLand’s visual hierarchy, with major streets being yellow. But I find GeoLand’s fattened streets pushing between building outlines less intuitive than Idea Design’s narrower streets.


GeoLand Tbilisi_detail

Around Betlemi St (which they, confusing, have translated — “Bethlehem” — rather than tranliterated — Betlemis) it’s a bit of a tangled tube-fest.

Unfortunately on both the Geoland and the Walk Around Old City, little icons overlie important information. Does “G. Khandzteli St.” (shown as “Gr. Khandzteli St.” on Walk Around Old City and გრიგოლ ხანძთელის ქუჩა on OSM) intersect K. Aphkhazi St. (K. Abkhazi St./კოტე აფხაზის ქუჩა)? No! But we can see this only on OSM because of church symbols on the other two maps. And on GeoLand, Tavisuphleba Sq. seems to read Visuphleba Sq. because of the unfortunate placement of a hotel icon.

Both GeoLand and Idea Design’s maps have the same scale, near 1:50,000, and both come with a metro map. But Tbilisi: A Walk Around Old City also comes with a street index and a nice “Description of Architecture of the Main Avenue,” explaining eighteen buildings along Rustaveli. On the downside, the marking of the “Grand Tour” (clear dashes on grey) and the “Short Tour” (red dashes on pink) both follow the overhead cable car line from Rike Park up to the Narikala Fortress, and their lines not only obliterate lower Gomi Street (does it connect with Betlem?) but also make it look like there are two bridges (or is it one bridge and a shadow?) across the river between the fanciful Peace bridge and the Metekhi bridge.


Tbilisi, A Walk Around Old City_detail

Two other maps of Tbilisi are worth mentioning. One is the map in the Lonely Planet 2016 Georgia, Armenia and Azerbaijan.

Lonely Planet Georgia 2016 Tbilisi Old Town map_small

It’s the familiar styling of Lonely Planet maps, but now that we’ve looked so closely at these other maps, we can appreciate the good, bad and downright weird things LP has done here. On the good side, this is a really clean map. It’s also the only map we’ve seen that labels Kote Abkhazis with “Leselidzis” in brackets so we know the old name of the street. On the bad side, many streets are not labelled, leaving you mystified as you wander around old town looking for a street sign. (Although I’m open to considering that this actually may make for a better exploratory experience.) As for downright weird, they’ve transliterated the Georgian letter ქ as ‘q,’ so the familiar word for street, ‘kucha,’ appears as qucha. Yes, it’s true that when typing with a Georgian keyboard you do strike the q to get ქ, but this letter is always transliterated as k, or k’, or the IPA /k⁽ʰ⁾/ — not Q.

Last but not least is this hand-drawn map from Mark Elliott’s 4th Edition (2010) Azerbaijan with excursions to Georgia. I know it seems weird to look in a guide to Azerbaijan for a map to Tbilisi, but there it is.

Elliott ed4 small

This is an absolutely amazing map. Mark Elliott’s guidebook is filled with these hand-drawn maps — it is officially it my favourite guide book in the world! Naturally most of the maps are of towns in Azerbaijan. But here too (taking into account that the book is eight years old – a new edition is out this year) he has done a model job. Notice how the street widths flow and change naturally, widening into little openings. The impression is of a map someone has carefully drawn for you and you alone. Notice how none of the labels run into each other or obscure important information. Even though before I praised a map that used Georgian terms like “kucha” instead of street, I like here how he has omitted “street,” “avenue,” etc. Without colour he has still shown us where all the parks are, the river, the important landmarks. This, in my mind, is where the future of mapping is going: carefully curated, hand-drawn maps.

Kote Aphkhazi kucha

კოტე აფხაზის ქუჩა/K’ot’e Apkhazis Kucha/Abkhazi St.

With all of this to choose from, what did I use? In the end, the map I carried around and pulled out the most often was the OSM map that I had printed at home. It had all the alleys. It had the pedestrian underpasses. It had Georgian on it, so I didn’t have to wonder if it was Betlemi, Bethlehem or Betlemis St: it was just ბეთლემის ქუჩა. I was happy to have all these other maps (except the weird Tbilisi City Miniguide and Map) and I absorbed important landmarks from them. I just didn’t tend to pull them out as often. When I did pull out a second map, it was GeoLand.


შავთელის ქუჩა/Shavtelis kucha/Shavteli St.

If you want to print your own OSM map as I did, it’s a relatively simple process. I understand that there are sites that claim to make this easy, however I never encountered one that would work at zoom level 17, so here’s what you do.

OSM has a handy export as PDF function under the “Share” button.

OSM share function

(Not sure how that’s sharing, but whatever). The important thing to do first is to re-size your browser to approximately the aspect ratio of the paper you are going to print on (letter-size, in my case). Then, simply pan around, saving PDFs that overlap slightly. They should all come out at the same scale. Print them. Cut and tape.



Derrick Creek: A Cartographer’s Dilemma

As we stepped out of the car, mosquitoes closed in. Having driven deep into the wilds of northern BC, I don’t know what else I should have expected. Fully seventeen hours north of Vancouver we had turned off a paved road onto an unnamed logging road with a shabby old sign for the “Derrick Creek Rec Site 6km,” one of the many gravel roads built for the giant logging trucks that prowl this far northern forest with their loads of valuable, recently chopped down, trees. Fallen trees that lay across the road had been sawed through by helpful earlier travellers. Only one was recent enough to block our path but we were able to lift it and pivot it off the road.

Mark slung a rucksack at me and and said, “Come on. This had better be good.” We donned wading boots and plunged into the forest.

The reason we were here was a cartographer’s dilemma. Derrick Creek, as I had first seen it on the Canadian topographic map poetically named “103P: Nass River” was a waterway that flowed south out of Derrick Lake and went some ten kilometres south to the Cranberry River.

103P detail 2

103 P “Nass River,” 1989 1:250,000

The Cranberry, one of northern BC’s important inhabited rivers since time immemorial, and heart of the traditional lands of the Gitanyow First Nation, is shown on this same map winding back and forth, meandering its way westward, down to the mighty Nass, a river so provincially significant that in the coding of BC’s major watersheds it bears the halcyon number “500.”

103P “Nass River,” though, is a pretty small scale map, which means that while it covers a lot of territory it is not in any sense “zoomed in,” as we might say nowadays when we can pick up a phone and use our fingers like little stretching tools to zoom in on Google maps. 103 P, produced in 1989, is at the relatively undetailed 1:250,000 scale.

02_103P10 detail

103 P 10, “Cranberry River,” 1984, 1:50,000

When you look at the more detailed 1:50,000 scale map 103P-10 “Cranberry River” (Second Edition, 1984, the most recent you can get), Derrick Creek, which the Gitanyow people call Xsimihletxwt (“green creek”),  is visible in more detail. It flows out of Derrick Lake, passes around the letters WM, skirts a small swamp and goes into a small unnamed lake (near “23”), then flows south, crosses under the highway and into Bonus Lake. This is how Derrick Creek proceeds to the Cranberry. Quiet, reliable, placid. Probably infested with beaver.

(Bear that small unnamed lake near the “23” in mind. We’ll call it Unnamed Lake 1. It will become important later on.)

So, all good. Except, apparently no longer true.

Today, if you look at a online map produced by Natural Resources Canada, or Open Street Map, what you will see is that after leaving Derrick Lake, the creek goes south for a bit, then just before hitting that unnamed lake it appears to change its mind, and it heads west. It heads west, passes under the highway, through a second and bigger unnamed lake and goes into the Nass. No Cranberry River. No Bonus Lake.

06_CBMT annotated


Detail of the area where Derrick Creek has apparently changed course

This could be fairly significant if you told your friend “Lets go fishing at the mouth of Derrick Creek,” and she showed up at the place on the Cranberry, the place where a streams still flows in but apparently we don’t call it Derrick Creek any more, and you showed up on the Nass at that new Derrick Creek, like a second location of your favourite restaurant, recently built and all glitzy, but somehow lacking the charm of the original, and somehow too even the food doesn’t taste as good. Especially the fish.

In short, Mark and I are here to figure out what happened. Was it an old mapping error? Did Derrick Creek never flow to the Cranberry? Or did the stream change course, some time between 1989 and 2018?

You’ll also notice on the map above a swamp at the point where Derrick Creek allegedly changed course, and this may be helpful. Strange things happen in swamps. Water flows slowly and in multiple directions. Beavers do stuff, small actions of chewing down trees and pushing them into certain places in the creek flow, small acts that add up to big changes in the end. We’re here to look for evidence.

The old logging road that Mark and I now set off on, on foot, is overgrown with alder. Two old tracks of vehicle tires are still visible on the ground, and the dog weaves ahead easily along them, while at the height of my face alders slap me repeatedly. Which is welcome, because it’s brushing off the mosquitoes. It’s clear that no one had driven this road for about ten years.

After a few minutes of breathless alder crashing we come to an old log landing, a clearing in the forest where cut trees were stockpiled before loading onto trucks. There’s an old camp here with a small stove cunningly made from a steel barrel. We strike off at a bearing of 290° through a forest of evenly spaced pines, trees apparently planted some 40 years before. A few minutes later we hit the old channel of Derrick Creek, just above Unnamed Lake 1. It is neither stagnant nor non-existent. It is a small, burbling little stream. It is small, less than a metre across, and flowing with no great volume, but it does exist.

Why does this even matter?

Well, should the map looks like this (the old way)…

05_basemap v2

or like this (the old way)?

04_basemap v1

It’s a big difference.

But, it should be easy to decide. Here are the sites we need to visit.

00 map of sites

Roads, streams and lake from current provincial data; “indefinite” streams shown in lighter blue. Contours from SRTM 1″ coverage.

  • Culvert 1, to observe what’s coming down the “old” Derrick Creek and flowing into Bonus Lake
  • Bridge 1, should be the same as what we see at Culvert 1
  • Bridge 2, to observe the contribution of an unnamed tributary that heads straight to Unnamed Lake 1
  • Bridge 3, to observe the outflow from Derrick Lake
  • The Split, to see what happens there
  • Culvert 2, to observe the flow in the “new” Derrick Creek, which, incidentally, is classified as “intermittent” in the provincial Freshwater Stream Network data

In the nineteenth century the standard way European explorers in Africa or Afghanistan decided which was the primary tributary of a river was to measure the flows of each at the confluence. This was height of the patriarchy, I know, but their simple science had a reasonable method: the stream contributing the greater amount of water got the name of the river, and up it the intrepid explorer went on the continuing quest for the headwaters. Admittedly this usually resulted in boundaries being drawn by Great Powers, and odd nation states being created for the purposes of the same said Great Powers, but we’re not doing any of that here. We know this is Gitanyow territory. We just need to figure out where Derrick Creek. really goes. It’s a cartographer’s dilemma and a cartographer’s errand.

And our problem is a bit different from that of the nineteenth century explorer. We already know where the headwaters are. Derrick Creek comes down from Derrick Lake. We’re trying to figure out where the resulting flow goes. But we can still use the principle that where more water flows, that’s the main stream. We’re just doing it … downhill.

Working our way upstream we come to the key place: on the edge of a large swampy clearing, Derrick Creek is flowing in from the east and splitting in front of me into one fork that continues west across the swamp and, presumably, eventually to the Nass, and one fork that lazily turns south and feeds this small stream that goes to unnamed lake #1.

Derrick Creek fork

Mind you this is not swiftly flowing water. Everything is at the same level, no doubt due to beaver dams. So the place the creek divides is more of a pond with two outflows. There’s no current to observe.

Mosquitoes close in as I survey the water and balance precariously atop hummocks of grass with water between them. We’re going to call this place The Split.

Down in the direction of Unnamed Lake 1, I can hear the water spilling over what is probably a beaver dam and beginning its descent. Looking at the surrounding forest I can see that there is a significant historical channel this way. To the west the swamp continues on as a wide opening in the surrounding forest and its unclear how the stream leaves it. At any rate it seems not a lot of water is flowing through here, at least not on the surface. Subsurface flow is possible.

I’m not able to measure how much water is leaving via the two exits at The Split. However, I have a bit of a proxy. If we go look at Culverts 1 and 2, we should be able to compare the flow through them and decide which is the bigger stream. These two points underneath the highway represent the only candidates for how water in Derrick Lake can leave the area, so they should tell us where the major stream is.

On the way out however it seems worthwhile to check the flows at Bridges 1, 2 and 3. And this introduces more uncertainty. At Bridge 1 we have a good flow of a creek a few meters across and fairly shallow, say 15 cm or less. At Bridge 2 we have the same thing, suggesting that most of what’s flowing down to Bonus Lake in fact comes from this unnamed tributary, and not from Derrick Lake at all. At Bridge 3 is the actual outflow from Derrick Lake and our first look at what is undisputedly Derrick Creek. The water here is sluggish. It might be a metre deep in the middle but there’s little flow. As if Derrick Lake isn’t really draining much at all.

So it’s on down to Culvert #1, where the “old” Derrick Creek flowed under Highway 37 and into Bonus Lake. Mosquitoes declare themselves in force, and drive us into amusing looking but useful white bug jackets.

Culvert #1 is impressive. It has been engineered for major flow, and is in fact enormous twin culverts, each about 4 metres in diameter. (They are such a major work of engineering as to have a highway sign, which identifies then as “Derrick Creek North Culvert” and “Derrick Creek South Culvert.” This suggests the BC Ministry of Highways has not been informed by the BC Ministry of the Environment about the new direction the creek took.) You could drive a small car through either of them. The flow of the creek, although decent,  barely fills the bottom of these huge structures.


Culvert #1

So now we visit Culvert #2, the culvert where the “new” Derrick Creek passes under highway 37. This is a shocker. We can barely even locate it because of the tiny size of the drainage and the almost inaudible water flow. The GPS is called in to confirm we are in the right place.

Derrick Creek (Nass) culvert Hwy 37

Culvert #2

There’s almost no water here. And culvert #2 itself is small, less than a metre in diameter. No more than a trickle of water flows through it.

It’s plainly impossible that Culvert #2 carries is the main flow of Derrick Creek. The flow from The Split toward unnamed lake #1 may be lazy, but it’s more than we see here. Culvert #1 is carrying much more water, a real stream.

It looks like something is badly awry with the Freshwater Stream data for Derrick Creek, and I’m going to go with the old scheme shown on the maps from the 1980s: Derrick Creek flows out to the Cranberry.

But there’s a third possibility. What we saw at bridges 1, 2 and 3 suggests that most of what used to be, at Bonus Lake, called Derrick Creek comes from that unnamed tributary, and there’s actually very little water flowing out of Derrick Lake. It’s easy to imagine that before the current generation of beaver dams the outflow of Derrick Lake was sufficiently connected to this active stream as to give it its name, but that even then most of the water came from the unnamed tributary. There may need to be another reconnaissance one day. I can see it now: a canoe, little stream gauges, perhaps a drone….

Back in the car, Mark seizes the packet of topographic maps we’ve been using for reference and says, “I know how this thing can be really useful.” He begins swatting bugs with it.



Maps for Θεσσαλονικη/Thessaloniki

On a recent trip to Thessaloniki I acquired quite a few maps of the city. It turns out that finding a really good one is not trivial. Here’s the one I kept going back to:

Fraport map

This is the Fraport map which is available for free at the airport. (I found a display of them in the baggage claim area.) I’ve written in the bus routes on the major avenues myself. The cover looks like this:

Fraport map cover

But I was not able to get a hold of this map before arriving. The map that I printed out at home was this one:


You can download this as a PDF from   It’s good but a bit hard to read.

Some of the other maps you can acquire in Thessaloniki itself are worth looking at. The next three I picked up at the tourist information point at the bottom of Aristolelous. Here is their Thessaloniki City Map:

city map

As you can see, not all streets are labelled. Its cover looks like this:

city map cover


And there is the even more spare Thessaloniki Museums’ Map:

museums map

and its cover…

museums map cover

And the Thessaloniki Monuments Map:

monuments map

with its cover (this is the Greek edition):

monuments map cover

I have to say the Museums’ and Monuments Maps are so skeletal as to be useless for navigation in the city. Also, there’s some inconsistency.  The Museums’ map and the Monuments map both identify the street that leads south from Antigonidon Square to Egnatia as “Παπαζωλη/Papazoli,” whereas the other maps agree that it is called “Antigonidon.”

A map that I bought in a bookstore was this “Best of” map:

best of map

Its cover:

best of map cover

It’s pretty good, but the lamination actually caused me not to use it. Too hard to draw on.

Last but not least, that all-important bus route map. You can get this at the tourist info point as well.

bus map

Its cover:

bus map cover

This is a tiny map, and not quite as detailed as you might like, but oh-so-valuable. You don’t use it for finding your way around on foot, only for figuring out where bus routes go and which one you want.

A Little Geometric Creativity

There’s a nice old geometric pattern…


…that Eric Broug presents in his book Islamic Geometric Patterns as being from the Great Mosque of Herat.

Its construction is based on a hexagon, and the pattern repeats as additional hexagons are tiled around the first one. The underlying hexagons (which are not drawn in the finished pattern) are shown in red here:


This makes a fine star/wedge/triangle pattern that is quite satisfying to look at, and suitable for decorating things in your house.

The construction of one of the hexagon-based units of the pattern begins with drawing a circle, and then a hexagon within that circle. Once the hexagon is drawn, the lines of the pattern can be drawn within in it.

But in the real world, a medium on which we are drawing (or painting) always has edges, and those edges do not go along the edges of the hexagons. For example, let’s say we want to draw one of the pattern units, plus however much extra fits, on a square board or tile. Something like this:


Draw in the supporting hexagons and you will see that the one complete pattern is indeed surrounded by only parts of adjacent copies of the pattern.


It’s a bit of a construction conundrum. How will we fill in the portion of the pattern that lies outside the one central hexagon that we will have room to draw? How will we extend the pattern to the edges of the square when we cannot place a compass foot at the centre of any of the adjacent circles that would define the basic hexagons?

There is a way.

Let’s review how the pattern is made, and then examine how to extend it without being able to draw more circles. Follow along with your own piece of paper, pencil, compass and straightedge.

There is something magical in the fact that this pattern, with all of its exact proportions, can be constructed solely with a compass and a straightedge. You never need to measure an angle or a line.

To construct a hexagon, one begins by drawing a circle.


Within the circle inscribe a hexagon using the standard method of walking the legs of your compass (still set to the same radius) around the circle. We’ll call this Hexagon A. It is oriented so it is a point-up hexagon.


Draw radii through all the vertices of the hexagon. We’ll call these the ribs of hexagon A.



Now we need to construct a second hexagon of the same size, and on the same centre, but rotated 30°. To do this we will connect the midpoints of the six arcs from the hexagon already made.

If we had plenty of room, we would find those midpoints by first drawing six more circles (of the same radius) centred on the six vertices of hexagon A; and then draw lines from the centre of the original circle to the outer points of intersection of adjacent secondary circles. These ribs (purple, below) would show us the midpoints of the arcs.


figure22But with the limited space we are working with, we need instead to bisect one side of the hexagon. This can be done with two compass arcs from adjacent vertices of hexagon A; we can then connect their intersection outside the circle with the circle’s centre.


This line bisects one of the arcs, and we can use that as a starting point for making a second hexagon. We’ll call this Hexagon B, and it is oriented so it is a side-up hexagon.

Draw ribs for hexagon B.


Note that the ribs of hexagon B (purple) go through the midpoints of the sides of hexagon A (red).

Connect the hexagon A midpoints to make a six-pointed star. We’ll call these star 1 lines (green in the next figure).


Similarly, we can note that the ribs of hexagon A pass through the midpoints of the sides of hexagon B. Connect the midpoints of hexagon B to make Star 2 — being sure, however, in this case to extend the star lines beyond hexagon B as far as the first edge of hexagon A you encounter. We’ll call these star 2 lines (blue in the next figure).


Finally, we ink certain portions of the Star 1 and Star 2 lines to make the final pattern. Note that the entire pattern lies within hexagon A.


The pattern that is inked consists only of portions of star 1 and star 2 lines. In fact we drew hexagons A and B, and their ribs, only to create the star 1 and 2 lines. And we drew the initial circle only to create hexagons A and B.

In order to extend the pattern we need to draw more star 1 and 2 lines outside our original hexagon. On a larger medium we could easily place the centres of new circles outside hexagon A, but on this limited surface where we are working we cannot.

It may help to look at what we need to find.


From our earlier construction of adjacent hexagonal cells, we know a few things about what should be happening. Star 1 lines leaving the hexagon (A in the diagram above) go a certain distance to a point Y (which we’re not really sure how to locate) and then turn through 120° to follow a line D.

Star 2 lines leaving the hexagon (B in the diagram above) go a certain distance to a point X (which we’re not really sure how to locate) where they cross a star 2 line (C) in the adjacent hexagons. At some farther point Z they also go through 120° turns.

As well, it’s valuable to make a few observations about what happens as these lines enter adjacent hexagons…

1. Hexagon A sides, when extended, become the ribs of other hexagons A, and vice versa.


2. Star 1 lines become some of the star 1 lines of adjacent hexagons.


3. Star 2 lines become some of the star 2 lines of adjacent hexagons.


This means that by extending these hexagon sides, ribs and star lines, we have much (but not all) of the construction information for the pattern outside the original hexagon.


What’s missing are lines C and D, and points X, Y and Z.

But now we can see that point X is the place where the extended hexagon A sides meet the extended star 2 lines. Drawing a line through them gives us line C.


Similarly, Point Y is the place where the extended hexagon A sides meet the extended star 1 lines. Drawing a line through pairs of points Y gives us line D.


At this point we have all the construction lines we need to ink the rest of the pattern outside the original hexagon…


…and then remove the construction lines.


It’s very satisfying to be able to construct this figure in a limited space, and to solve the problems associated. But now, as a bonus, it appear that the pattern presents us with a fascinating geometry problem!

As the pattern is extended, a new, larger hexagon has appeared, a hexagon that is similar to hexagon B, but is formed by star 1 lines that pass on the outside of the six small triangles. We’ll call it hexagon C. In the illustration below, hexagon B is purple, and hexagon C is blue.


It’s a bit of a puzzler, but I’ll just leave the problem here for the intrigued reader to solve. In terms of the side length of hexagon B, what is the side length of hexagon C?

Making shaded relief from digital elevation models (DEMs) in QGIS: a British Columbia perspective

Who would not agree with Tom Patterson, creator of the fabulous website, when he said, “There is no more important component of a map than the shaded relief.”

But the topic of creating your own shaded relief from a DEM is rather complex, so I’ve made a few assumptions in this how-to. I’m assuming:

  • you know your way around QGIS (I am using QGIS 2.18 for this post)
  • you’re familiar with the idea of projections, and re-projecting raster data
  • you know that each projection/datum combination has an EPSG number, which is a convenient way to refer to it. For example
    • Lat/Long/WGS84 = 4326
    • UTM Zone 9N/WGS84 = 32609
    • BC Albers = 3005

If that’s the case, there are really only three things you need to know in order to made your own hillshades:  where to get the data, how to transform it, and what pitfalls to avoid.

Why even make your own hillshade?

Usually when I want to include shaded relief in a map that is in British Columbia, the first place I will turn is the WMS service at

001_WMS hillshade example

The 315 black-and-white hillshade from The black-and-white hillshade with the sun at an azimuth of 315° is typically the most useful of the layers on this WMS server.

It’s got some limitations:

  • there are only two sun azimuths to select from: 315° (northwest) and 225° (southwest). More flexibility would be good, because each landscape seems to have a different ideal azimuth to bring out the landforms that you want to bring out. More about this down below.
  • there’s no height exaggeration possible
  • occasionally there are odd artifacts, like straight lines running across the hillshade

On the other hand, you can adjust its brightness and contrast, and use the Multiply blend mode, which means you can do some nice things with it.

002_WMS hillshade example with overlay

When you set the blend mode of a hillshade to MULTIPLY, it shows through upper layers.

But, if you want to adjust the azimuth or exaggerate height, you’ll need to find a DEM and make your own hillshade.  It’s well-established (though not well-explained) that the human eye needs to see light from above, preferably from above and to the left. If your map is, say,  south-up, you will need a hillshade where the light comes from the southeast (which will be in the upper left).

004_WMS hillshade example rotated 180

Now south is at the top (map is rotated 180°) and the shaded relief appears flat or inverted. For this map you would need a hillshade where the sun’s azimuth is southeast, or 135°.

005_DEM hillshade rotated 180

Here the map is still rotated 180°, but the hillshade has been manufactured with an azimuth of 135°. The mountains look like mountains again.

006_DEM hillshade rotated 180 3x

A 3x vertical exaggeration of the terrain emphasizes the detail in the valley bottoms.

The overall process

007a_flow chart

Let’s talk about the three principles.

  1. The hillshading algorithms require a DEM in a metric projection. That means that DEMs projected in degrees won’t work: you have to re-project them first. Unfortunately, just about all DEMS come projected in degrees.
  2. The scale of your final map determines what sort of cell size you want in your re-projected DEM. A DEM with 10m cells is far too detailed for a map at 1:500,000, and the file would be enormous. On the other hand, a cell size of 500m would make a very coarse hillshade at 1:500,000. As a general guideline, divide the denominator of your scale by 5000 to get roughly what cell size you want. So if your map is 1:100,000, you’d be looking for a DEM with (roughly) 20m cells.
  3. It is an option to style any DEM as “Hillshade” (other options are singleband grey, multiband colour, paletted, etc.) but the hillshading algorithm in the toolbox (Processing>Toolbox) produces a better result.

Acquiring DEM data

The first thing you need to do is pick your resolution. Because DEMs usually come projected in 4326, DEM resolution is typically expressed in arc-seconds, or seconds of latitude. Because degrees of latitude in BC are bigger than degrees of longitude, these cells are not square. They are upright rectangles.

What you want to know is how these non-square cells measured in arc-seconds will convert to square cells measured in metres. Here’s a handy chart.

resolution degrees resolution metres pixel size in degrees source limitations recommended scale Notes
1/3 “ 6 9.26E-05 USA only ~ 1:30,000 It comes as 1°x 1° tiles. Files have names like “,” which would be the 1°x 1° tile northeast of 44°N, 110°W.
1” 17 0.000208333 SRTM 1 for all of North America at
Europe at
North America and Europe ~ 1:100,000 From recordlist these come as 1°x1° tiles in HGT format, each about 25MB. The file N55W128.hgt would be north and east of 55°N, 128°W
3” 45 0.000833333 This coverage, based on SRTM data, is available for the world in two different versions.

worldwide~ 1:300,000v4 data is better, but it comes as 5°x5° tiles. The SRTM 3 comes as 1°x1°tiles in HGT format. The old CDED dems were this resolution.

15”4500.00416667 1:1,500,000  250m and 500m (Password: ThanksCSI!) worldwide~ 1:1,000,000 and 1:2,000,000re-samplings of the finer resolution data30”1 km0.00833333 Or 1:3,000,000at this point you should be considering the shaded relief at’10 km 1:30,000,000 

You’ll notice that I favour the DEMs created from the Shuttle Radar Topography Mission (SRTM). These have a few advantages over the DEMs produced by Natural Resources Canada or the provincial mapping agencies:

  • they are usually more recent (dating to about 2000)
  • they represent actual measurements, as opposed to a grid generated from contour lines
  • they go right across provincial and international boundaries

From here, I’ll demonstrate how this works with an actual example. In this case I want shaded relief for a series of maps that I’m making. All the maps are in the same area, and they range in scale from 1:45,000 to 1:130,000. Looking at the handy chart above, this scale suggests I’m going to want to use SRTM 1 DEM.

007c determining the tiles you want2

Displaying an area in a print composer with grid of lines in CRS 4326 is one way to figure out which tiles you’ll need.

So I go to Recordlist, enter the bounding box and select SRTM1.

008_recordlist selecting DEMs

Downloading DEM tiles from Recordlist

Once they are downloaded and unzipped, I’ll read them into QGIS to confirm that they cover the right area.

Merge and Clip

You want to merge all of the individual DEMs into one, using Raster>Miscellaneous>Merge. (Incidentally, they do not have to be read into QGIS to do this.)

016_merging DEMs

QGIS’s raster merge dialogue

I tend to name the resulting DEM with “_4326” on the end so that later I will know what projection it’s in.

It’s tempting to display as hillshade now, but don’t. The hillshade styling is not meant for DEMs projected in degrees.

040_displaying as hillshade when projected in degrees

Styling the DEM as “hillshade” produces ugly results when the DEM is projected in degrees

If you want to clip the merged DEM, now is the time to do it. Remember that with Raster>Extraction>Clipper you will need to change the QGIS projection to the DEM’s native projection (4326) before you draw the clipping box. Be sure to check, once you come back to your map’s projection, that the clip you made covers your whole print composer.

Re-project and re-sample

Reprojection is the process of giving raster cells coordinates in a new projection. Resampling, on the other hand, is the process of creating new cells based on old cells at a coarser or finer resolution. The two are essentially inseparable, since as you reproject from 4326 to, say, 32609, you will also want to go from the rectangular cells of the degree-projected DEM to nice square cells in the UTM projection.

The first thing to do is to right-click the DEM and choose Save As… so you can see the dimensions of the original DEM cells.

050_Save As dialogue

Note that once you set the CRS for the saved copy to be 32609, you get a suggested resolution of (roughly) 17 x 31m cells. That’s the native cell size of this SRTM DEM at this latitude. Note down the “17” (the smaller dimension)  somewhere, and close this dialogue.

You can reproject and resample using QGIS’s Save As… feature, but you don’t get control over the resampling algorithm used, and the results, once you get to the final hillshade, are ugly.

060_hillshade produced with QGIS Save As

When you reproject using Save As…, the final hillshade sometimes has these weird cross-hatching artifacts in it

Instead, you want to re-project and re-sample with the Warp tool in the toolbox. (Go Processing>Toolbox and search on “warp.”)

084_reprojecting using gdalwarp through QGIS toolbox

The toolbox’s Warp tool

In this dialogue…

  • Source SRS should be 4326
  • Destination SRS should be 32609 (or whatever metric projection you are making your final map in)
  • Output file resolution can be whatever you want, but I get good results with the smaller of the two cell dimensions I saw in the Save As dialogue — in this case, 17.
  • Trial and error with making hillshades has convinced me that the best resampling method to choose here is “bilinear.”
  • I name the resulting DEM with a “_32609” on the end so I will know its projection in the future.

The new 32609 DEM should look the same as the 4326 DEM when read into QGIS, but if you go to the Metadata tab in Layer Properties you’ll see it has a cell size of 17 metres, and quite different pixel dimensions.

For your final hillshade, the one you use in your map, you will want something better that what you get if you just style this DEM as “hillshade.”  But for now, go ahead and style it as “hillshade.” This enables you to play with the sun azimuth and elevation, and the vertical exaggeration, to see what is going to work best for your terrain. The human eye probably wants an azimuth around north-northwest (337.5) but there are a lot of azimuths on either side that will work.

Notice how changing azimuth changes what’s brought out in this piece of terrain:

Make a static hillshade

Now if this hillshade has no strange artifacts, you’re done. But if you want a smoother results, it’s time to take the azimuth, sun elevation and vertical exaggeration you’ve chosen, and go over to the Hillshade tool in the toolbox (go Processing>Toolbox and search on “hillshade”). This will produce a raster hillshade that you just display as singleband grey. It also tend to be about half the file size of the DEM itself.

086 running toolbox hillshade2

The toolbox’s Hillshade tool

And here’s the result

090_hillshade produced with gdalwarp gdaldem hillshade

Look, no artifacts!

Displaying hillshades

Typically you put the hillshade as the bottom layer in your map, and adjust brightness and contrast — because hillshades tend to be a bit darker than you want. Usually it’s brightness up, contrast down. Sometimes you will also make it semi-transparent.

More important, in terms of getting the rest of you map layers to appear to drape over your hillshade, is to set the blend mode of the hillshade to Multiply.

091_adjusting brightness etc

Multiply causes the values (lightness, darkness) in the hillshade to be adopted by layers above it.

So you can get something like this.

095_final result with multiply

Overlaying a hillshade whose blend mode is set to Multiply

That’s it. Using these techniques, you should be able to manufacture hillshades with any azimuth, pretty much all over the world. It gets the most challenging when you are mapping at large scales like 1:20,000.

Finally, if you master this, and you are really in love with shaded relief, you will want to experiment with making shaded relief in Blender.

Tracing the Great Southern and Western

The “Ring of Kerry” is a 180 km tourist route around one of the rugged peninsulas on the west coast of Ireland. Although its moniker probably arose in a 20th century tourism promotion, the  route itself is one that travellers in the neighbourhood of the Irish town of Killarney have been encouraged to go round since the 1800s.

Here is Samuel Carter Hall, in his 1858 traveller’s guide, A Week At Killarney, expanding in full Victorian eloquence on why one might make this journey:

We shall ask the reader to accompany us to the wild sea-coast of the South-west, and the Tourist to follow us into a district where the graceful beauties of Killarney may be contrasted with the wild grandeur of scenery certainly unsurpassed in Ireland. That district is now visited by a large number of those who visit Killarney; and one of our special objects in our latest tour–in 1858– was to describe the routes to it, with the facilities for travelling and accommodation; and at the same time to picture its peculiarities as well as our limited space and opportunities permit us to do.

The district Hall is referring to is the Iveragh peninsula, jutting west into the Atlantic from the area around Killarney. Hall’s tourist is to begin from Killarney and proceed south to the town of Kenmare — which anchors the southeast corner of the peninsula; then out along its southern coast, up around the end, and back along the north coast to Killarney. With horse and jaunting cart the tour took the Victorian traveller two days. (Hall recommended hiring a single set of horses for the entire journey.) Today most visitors drive it in one.

But not all visitors have explored the Iveragh peninsula by horse-drawn car or horseless carriage.  Some 35 years after Hall published his guide, a new option appeared: rail. The West Kerry Branch of the Great Southern and Western Railway began its service in 1893, running along the north coast of the Iveragh from Farranfore to Reenard Point. Farranfore was a connection with the main line running from Tralee to Killarney and on to Cork; Reenard Point was a ferry terminal on the outermost coast where passengers could board a boat and continue out to Valentia Island, a place sometimes promoted with the tantalizing (but geographically incorrect) fact of being the westernmost point in Europe. However it is fair to say that the GS&W was the westernmost railway in Europe.

1902 route map

The West Kerry Branch of the GS&W highlighted in yellow. (Map from Project Gutenberg: “Great_Southern_and_Western_Railway_-_1902_Ireland_routemap_-_Project_Gutenberg_eText_19329.jpg”)

Tourism was only one reason for this thirty-mile rail line out to the end of the world. Valentia Island hosted both famous slate quarries and an active fishing industry, and there was demand for the products of both in Ireland’s big neighbour to the east. No less a symbolic building than the Houses of Parliament in London was floored with Valentia slate.

This branch line ceased operations in 1960, and today most stations and track – which was the Irish Gauge, spaced 5′ 3” apart – have been removed. But, if you’re paying attention, you can still encounter bits and pieces of the railway, which visited the towns of Killorglin, Glenbeigh and Cahersiveen on its way.



In Killorglin a plaque on the sidewalk, near the Aldi supermarket on Iveragh Road, tells the story of this vanished line.

For example, in the village of Glenbeigh, if you cross the River Behy on the old bridge and go just a short distance left, you find the road cutting through the old railgrade, still some ten feet high.  The Gleensk Viaduct looms above your head as the road does a tight turn to contour through a small drainage on the steep-sided hill.  At Cahersiveen the old rail bridge stands just upstream as you cross the river Ferta.



On the way to Cahersiveen, the road snakes high above the Atlantic along the side of Drung Hill, and here a roadside pullout features an interpretive sign that details the history of the GS&W.


At the same location: the mouths of two railway tunnels are above the road but below the electric line running across the slope

In many ways though the most remarkable remains of the railway are the mute raised railbeds that run through farmers’ fields.



Do the cows know that a railway used to run along that strange, straight mound that cuts through their field? (Muingaphuca townland, near Killorglin)

As well, the railway is detectable in small kinks in present-day roads, like the one in the Caragh Lake Road 200m from where it meets the Ring of Kerry. Here the line crossed over the road, which jogs briefly to pass under a viaduct that is now completely gone.

There’s a remarkable web resource for tracing this old route. The Historic Environment Viewer of the Irish government’s Department of Arts, Heritage, Regional, Rural and Gaeltacht Affairs features a detailed basemap from Ordnance Survey Ireland (OSI) which shows the current status in superb detail at large scales.


Screenshot from 2017-08-23 15-54-25

OSI’s superbly detailed and up-to-date map of the area between the Caragh River (right) and the village of Glenbeigh (left). Portions of the old rail line are shown.

But here’s the magic: you can change the base map to the Cassini 6″ mapping. This is mapping at six inches to the mile (or 1:10,560) from the late nineteenth or early twentieth century, perfect for seeing where the railway ran. It turns out that, as one drives the Ring of Kerry from Glenbeigh to Cahersiveen, the old rail grade is never far away, sometimes running on the right, sometimes the left, side of the road.


Screenshot from 2017-08-23 10-39-19

The same region, but now seen against the Cassini 6″ basemap, c. 1900

As well, there are two other historic map layers here. The Historic 6″ dates from between 1829 and 1841; the Historic 25″ (twenty-five inches to the mile, or 1:2534!) from the end of the nineteenth century.

There was a hope at one time that trans-Atlantic vessels would depart from Valentia Island, passengers preferring to go as far towards North America as possible by rail before boarding ship. It never came to pass, but today the old rail line may perhaps have another life. Between Glenbeigh and Reenard Point the rail bed is presently the locus of debate about whether it will be turned into a cycleway. The conflict focuses on how local landowners will be compensated. If this can be worked out, yet a fourth mode of transport will be added to the choices travellers have had for exploring that peninsula west of Killarney.



Downloading OpenStreetMap data through Trimble

OpenStreetMap data is often the best large-scale data you can find in regions of the world where governments are not yet distributing free, open geodata.

There are several ways to download OSM data (QGIS plugin, Geofabrik, direct from OSM), but if the format you prefer is shapefile, and you have a specific area you’re interested in, the old Weogeo service  may be the easiest and the best way.

Weogeo seems to have been bought or otherwise taken over by the for-profit company Trimble. I appreciate Trimble hosting this service and keeping it alive, but since Trimble integrated it  into their pre-existing sales system, you have to go through a number of odd steps to get your free data. Since it’s free, open data, you hope for one of those good-feeling interactions that suggest the sharing-without-strings that OSM represents. Instead be prepared here for a less comfortable, more corporate, interaction where they’ll want to you to go to their “data marketplace,” make an account, “add to cart,” and so on. But it works really well.

Two important notes up front:

  1. If you use the Firefox plug-in “Privacy Badger,” it breaks this site. You have to disable it for
  2. You won’t get your data immediately. Depending on the order size you may have to wait up to 24 hours to receive the email saying that you can download it.

Here’s the procedure:

Go to

Click Shop OpenStreetMap data now. You are now at the Trimble Data Marketplace.

Sign In (upper right corner). (Registration is free, and necessary.) Your name should now appear in the upper right hand corner, and below it, over the northwest portion of the map, you should see a summary of your current order, with headings for Region, Layers, Datum-Projection and File Format.

Initially the map shows the entire world (in a ghastly pseudo-mercator projection, but that does go hand-in-hand with OSM). Region is “Entire map,” Layers are “26/26” (26 of 26 available layers), Datum-Projection is “Lat/Long-WGS84 (Native),” File Format is “ESRI Shape,” Estimated size is “1.36 TB” and cost is “Free.Trimble1

Don’t be fooled by the 1.36 TB. That’s the size of the entire world database for OSM. Trimble will restrict you to a 5 GB limit in a single order.

On the map you can now pan and zoom to the region you’re interested in. Let’s say you go to the area around Budapest, Hungary.

Notice that even though you are zoomed in, the Region is still “Entire Map” (meaning the whole world) and Estimated Size is still 1.36 TB. To narrow down your data area you have to either upload a KML file with a polygon of your area of interest, or draw a polygon on the screen.Trimble2

To draw a polygon, click the pencil icon next to Region, click Draw, and begin placing points around your polygon. Clicking on the initial point closes the polygon. Now Region and Estimated Size change to something more reasonable.

You may not want all 26 layers, and you can click the pencil icon next to Layers to select the subset you want. The 26 layers are explained in depth at the OSM wiki page on Map Features, but for simplicity I’ll just list the 26 categories here, with links to the OSM wiki page:

Note that these categories are often subdivided into separate shapefiles for point, line and polygon features.

In this case let’s say I want only Waterway, Highway, Railway. I deselect all, select these three, and click the “X” to close the Layers list. Layers has now changed to “3/26” and Estimated Size has now dropped to 381 MB.Trimble3

Then click Order. Accept the Content License and click Add To Cart. Click View Cart.

Everything should still read “Free,” so click Checkout. Go through the [annoying] Address Information and Select Payment steps (“No Payment Required”) and then finally Place Order.

The next step is that you receive a series of emails acknowledging your order, telling you that your order is being prepared, and finally that your order is ready for download. It can be almost immediate for small orders, or up to 24 hours for large ones.

When you do download your data it will be in a ZIP file called “weogeo_<order number>.zip.”