Thursday 6 April 2023

The longest straight line in Great Britain (without crossing a public road)

In short, I believe I've found a longer straight line without crossing a public road than the line identified by Ordnance Survey in 2019. Important stuff, clearly. Let me explain.

**Update, 8 April 2023: I've added a Part 2 to this now, where I find an even longer line in the same area. Also, be very careful if you try this route because it won't be at all easy and you may also be eaten alive by midgies, as well as all the other hazards like bogs, hills, snow, cloud and so on.**

This is a longer straight line than the one below

Back in 2018 someone asked Ordnance Survey a question on Twitter, as follows:

"what (and where) is the longest distance you can walk in a straight line in England/Wales/Scotland without crossing a road (defined as a paved surface for vehicular use)??"

Note 'a paved surface for vehicular use'. This is the most important bit for me and the reason I'm coming back to it again after years of working with this data and never quite finding time to investigate, until now.

It's an excellent question. The answer the OS team provided was then turned into a blog post on the OS website in early 2019, and you can read that here but see below for their map. There's also a fantastic short film of Calum Maclean and Jenny Graham walking the route. 

71.5km or 44.43 miles

Now, let me say a little bit more. I'm from the Highlands, know lots of this area pretty well from my days cycling around it on my mountain bike when I was a teenager, as well as loads of other trips over the years for all sorts of reasons. I also spend my days looking at map data because that's a big part of my job and because of that one thing troubled me a bit about this answer from Ordnance Survey. 

To be more precise, once again, it's the 'paved surface for vehicular use' part of the answer. I'll explain all below and my maps are very rough and quick but you'll hopefully see what I mean. 


The roads data

Ordnance Survey provide loads of great open data these days, and one of those products is their OS Open Roads product. Load it into your GIS software and it looks like the image below. You can see from just eyeballing it where the biggest gaps in the road network are - unsurprisingly, all in the north of Scotland. There are some gaps in England and Wales too but here I'm trying to find the longest straight line between roads in Great Britain so I'm focusing on the north of Scotland. The longest line in Great Britain is also the longest in the whole UK, because the density of roads in Northern Ireland is such that there's nowhere even remotely as long as the line above there.

All roads in Great Britain


This OS roads file is about 2GB in size and is really useful. However, when I've run different kinds of network analyses on it I sometimes run into problems because it also includes roads that are not public. These are typically flagged as 'Restricted Local Access Roads', and I've shown some of these in the zoomed-in map below in purple. You may think by looking that these are 'roads' but in reality they are usually unpaved private tracks but more on that further down the page. 

Restricted 'roads' in purple here

What do these restricted roads look like on the ground? Well, you can take a look via Google street view a lot of the time, and you can also get a sense for what public roads are just by hovering the street view icon over the map, like I've done below.

A much better representation of public roads

For example, if you travel down the road along the River Findhorn, you'll eventually get to the end of the public road. You can of course keep going on foot or on your bike because of the laws on access in Scotland but you can't drive down these routes (unless you have permission). 


The end of the public road


Another 'Restricted Local Access Road' - see what I mean?

If you download the roads file and then make public roads one colour (blue) and then the restricted roads a different colour and then make a head-splitting gif of the result, this is what you get. Study this for a while and then you start to wonder if you can find a longer line than the OS one from 2019. Sometimes restricted access roads are in places like caravan parks, cemeteries, and the like - but in the Highlands they are often in the hills too.

Loads of restricted access roads (purple) on the map

Using what I would consider to be the 'correct' OS roads file - i.e. the one in keeping with the original question and in keeping with the concept of public roads - I can get a longer line in the original Cairngorms route too, see below. Let's worry about distance over undulating ground later on.

I can get a distance over 74km (straight line) this way

But with my glasses on I could see a potentially longer route, that just missed a couple of public roads, this time to the west of the A9 instead of the east. That's the map I posted at the start, and again below.

From the A9 to near Fort William, a nice walk

I've added terrain to this one, to show how tough this would be

Here's a height profile for anyone mad enough to be thinking about doing this route. It looks horrendously tiring and almost certainly quite dangerous unless you're a bit of an expert. Units are in metres below and the max is just about 3,000 feet, with lots of ups and downs. How much distance does this actually add to the straight line? 

Well, it's never as much as I'd think and it depends upon the accuracy of your terrain model but using the publicly available OS Terrain 50 dataset I get a distance of 77.0 km / 47.8 miles for this so a bit longer than straight line distance. I calculated this in QGIS using the Saga 'Profiles from lines' tool. 

A nice wee stroll

Anyway, that's what I get when I look at the data. A bit longer than the OS answer, but that's because I've tried to stick to the spirit of the original question. Get a different result? Found a mistake? Feel free to let me know.

Not easy

All these options are over 75km, and none are easy!

Data source: © Crown copyright and database rights 2023. © OpenStreetMap and contributors

Want the line file to play around with? It's in this folder, in geojson, gpkg, gpx and shp formats. File name is longest-straight-line-candidate followed by the various file extensions for each type.

Interactive map version of my original line 

How could you systematically, definitively find the longest possible route? With some difficulty but it could be done. My map above involved converting OS open roads to polygons, then vertices then connecting vertices then measuring the longest lines and so on. It's not a trivial problem to solve with 100% accuracy, at least not for me.