The blog that wants to go obsolete
And now, back to that other interest of me: maps.
One of my favourites is maps showing the relief in the landscape. There’s the relief shading in Google’s terrain maps, or the height contour lines on topographic maps. But I find both hard to interpret. While both are good at showing the local relief, it’s difficult to make out the bigger picture. What I wanted was a map which uses a simple color map to represent elevation.
Let’s make one.
Turns out, there’s a lot of open map data available in New Zealand:
The LINZ data service has tons of layers available, including the topographic maps on various scales. That includes both the actual maps and the data underpinning those maps.] In principle you can render the entire topo maps by yourself using that data.
There was the HackAKL hackaton in 2014, and for that occasion some data sets were uploaded to Koordinates. One of the layers is a detailed set of road data. Although out of date by a couple of years, it’s the most detailed I could find, with details like roundabouts and slip lanes, and with detailed metadata, like road type (highway vs. arterial vs. smaller street) and speed limit.
Auckland council makes a lot of data available via Auckland Open Data.
All this data is available under a Creative Commons license *1 which permits sharing and adapting that data in your own works. Like your own map.
So, what goes into that map? Obviously, for a map colored by height, the first thing you need is a height image. The technical term is digital elevation model.
At first, you can easily tell from the relief shading on Google Maps they have a fairly detailed model available. However that’s probably not publicly available. So, what’s available then?
NZ 8m DEM: created by interpolating the 20m contour lines from the topographic map data.
Auckland 15m DEM: also created by interpolating topographic map data.
Auckland 1m DEM: derived from a lidar survey a few years ago.
The first two are probably derived from the same data. There’s only so much detail in 20m contour lines, so the DEM is less detailed than what appears to be available to the likes of Google.
The 1m model is much more detailed, which is already obvious from the preview on the Linz map viewer. But it’s huge—the area in that map above amounts to over 3 GB of data. For now I’m using the 15m model.
A common way to emphasize details in the landscape is relief shading. To make larger scale features more obvious the hue will vary by elevation.
Right, but that doesn’t look at all like Auckland. Until we reach the next ice age, Auckland will be surrounded by 2 harbours. So we’ll add the coastlines from the Topo 50 Data Layers:
One of the things which I always wonder is how things like roads and railways follow the landscape. So our map should have roads.
There’s 2 basic possibilities here: either we use the dataset uploaded for HackAKL, or we use the roads dataset from the topographic maps from Linz. The former is more detailed, both regarding the geometry and the metadata. Every roundabout and slip lane is in there, and the metadata can tell if a road is considered an arterial or a local street. Evem though it’s out-of-date by a couple of years, I’ll use that one.
There’s a third, and that’s using OpenStreetmap data, but I haven’t looked into that one.
There’s still some weird things. Takapuna just looks wrong—there’s supposed to be a lake over there.
For a bit more details we can add some of the topographic data layers. Lakes are in the layer called Lake Polygons. A few inlets are partially considered rivers. I’ve added cliff edges, swamps and ponds as well, and the sand polygons add some extra detail in the harbours. Finally, there’s the railways and stations.
And that’s all. How to convert all that data to that image above is a story for later.
Creative Commons Attribution 3.0 🇳🇿
Contains data sourced from Land Information New Zealand and Landcare Research under CC-BY.
Post a Comment