Blogindlæg

Looking for other ways to view elevation data?

15. jan. 2023


Inspired by requests from our users and fuelled by the deep algorithmic expertise of our technical team, we have now computed nationwide contour maps that cover all SCALGO Live countries. The new maps are visually attractive, good at highlighting important topographic features, and come with accuracy guarantees so you can be sure that we have not strayed too far from the “truth” in search of visual acumen.

The new contours will be updated at the same cadence as the national elevation model. Therefore, you can from now on always access detailed contours from the most up-to-date elevation data.

And don’t forget, the maps can be easily downloaded in CAD and GIS formats.

How to access the contour maps

The new data is made available under the Elevation category (Search in the Library!).

We have generated contours with an equidistance (elevation spacing) of 2,5 m and 50 cm see Figure 1. In some mountainous regions, the latter (50 cm) might be too detailed to be useful. On the other hand, in flat areas the former (2,5 m) are too sparse. Luckily, the contours render fast and are “just there”. Try both to find the layer that suits your project area!

Figure 1. Contour maps are available with elevation spacing of 2,5 m and 50 cm.

The maps are, per default, visualised using black lines as shown in Figure 1. If you want to combine the data with orthophotos, you might want to change the colour to bright white, shown in Figure 2.

Figure 2. You can choose between white and black contour lines.

Don’t forget the highs and lows

While the contour lines tell an important story about the shape of elevation data, sometimes you just want to find the very top or bottom in the terrain. Therefore, we have added “Peaks” and “Sinks” as an option. Upward-facing triangles are peaks and downward-facing triangles are sinks (see Figure 3). You add these to your map by clicking the gear menu next to the data.

Figure 3. Upward-facing triangles are peaks and downward-facing triangles are sinks.

Algorithmic legwork yields great results…

To create contour maps, we have processed elevation data for eight countries, consisting of about 3 trillion elevation measurements.

Generating contours from detailed data is tricky for several reasons, not least because of the sheer number of contour line segments that need to be processed. Imagine that you have an elevation model in 1-metre resolution of an entire country (e.g. Norway that is roughly 385.000 km2) and intersect this with a horizontal plane at every 50-centimetre elevation level (highest peak in Norway is just over 2400 metre). This produces a massive number of line segments that need to be simplified, stored and instantly visualised when someone zooms into a specific location… and that was just one country!

Contours generated by simply intersecting an elevation model are imperfect for many use cases, see Figure 4 for an example of raw data. For example, they reflect details (like small bumps in the terrain) that are insignificant for the high-level landscape overview and design that the contours are meant for. Contours work best when they highlight the overall trends in the terrain without unnecessary details. To achieve this, we have developed algorithms for simplifying the contour map.

Figure 4. Raw contour lines are not that smooth.

When simplifying a contour map, the hard part is to produce contours that are both visually attractive, sufficiently high-level, and at the same time ensure that the contours do not differ too much from the original terrain model. It’s easy to create beautiful smooth contours that are unconstrained by the actual elevation model. The hard part is generating attractive contours that highlight only the important features of the terrain, while still providing some guarantee on how much the contoured-terrain can differ from the original.

To find the right balance, we employed a number of interesting techniques, including subtle constrained simplification of the elevation model and tightly controlled simplification of the contour line segments themselves.

We tuned the simplification so that our contours never deviate from the actual elevation model by more than half the equidistance. That is, if you pick a point on a contour line in the layer with a contour interval of 50 cm and perform a point query, the terrain elevation will not differ by more than 25 cm from the contour line elevation.

At the end of the simplification process, the number of remaining line segments is sufficiently small. We then perform a careful smoothing of the remaining segments by converting them to so-called splines - smooth curves that are often used in CAD and are natively supported by many CAD file formats.

… and the work continues!

As you read this, we are working hard on the next contour-related release where we want to supplement the nationwide contour maps with support for computation of contour maps from terrain that is shaped in SCALGO Live workspaces. So stay tuned for more exciting updates in the future!