Home

Dave Barter edited this page Apr 21, 2016 · 8 revisions

Adding Height Data to Linestrings

Nautoguide's CEO, Dave Barter is a "slightly" obsessed cyclist. He spends a lot of his spare time seeking out the best hills on which to test his skinny frame. This in turn requires maps and contours to tell Dave where the gradients lie. For years he has pored over Ordnance Survey maps looking for the single and double chevrons. But sadly OS have yet to release these within any of their open data sets. So Dave tasked himself with trying to find this gradients through open data. This repo is the start of the search and contains some early prototype code and instructions. Please feel free to digest and comment, it would be great if we could create an overlay of gradient markers for every single British road ..and beyond.

The idea

In the UK we classify road gradients on a percentage scale with a 14% gradient representing a height gain over 14% over a given distance. So if I climb 14 metres in height over 100 metres I am on a 14% incline. Ordnance Survey maps show gradients using two type of marker, a single chevron (>) indicates a gradient of 14-20%, a double chevron (>>) indicates a gradient of 20% or greater. The idea is to attach height values to open data road line strings so that we can then search them for our required gradients. When we find a gradient that is greater than 14% we will classify it and output a point geometry that represents either a single or double chevron.

Using the ASTER_DEM direct

This page explains how I achieved this using POSTGIS and PGPLSQL

Using the ASTER_DEM contours

This page explains how I achieved this using POSTGIS and PGPLSQL

Using Terrain 50 contours and adding gradients

This page explains how I achieved this using POSTGIS and PGPLSQL