5x12 pentomino tiling
«

Maps for a Route

»

I've made an enhancement to my mapping application today which came about largely as a side effect of some work I've been doing for Beth to make it easier for her when she's entering details of new walks onto the WalkLakes site.

If you look at any walk there, like 'The old Keswick Railway Line and Latrigg' for example, you can see that there's lots of fields I can derive from the GPS track she enters.

Before today I was already doing start, distance, ascent, Naismith time, and date walked as well as populating the hill list.

Most of this I can do from the data the GPS gives me although for reasons discussed here previously I rely on the Ordnance Survey's open data Land-Form PANORAMA™ for ascent data, and hence Naismith, rather than using the elevation data in the GPS track.

The hill list I derive using the data I have in our copy of the Database of British and Irish hills, another open data resource. It includes the location of every summit so it's fairly easy to look for all summits close to the GPS track.

The thing Beth asked me to add was to work out which maps the track passes through and so that's what I did today. The 1:50K Landranger maps are easy as I have a table in my database, again courtesy of OS, which records the grid position of the bottom left hand corner of every map and all 1:50K maps are 40km x 40km squares so it's easy to derive from that the minimum and maximum easting and northing for a point to be on any sheet.

The 1:25 Outdoor Leisure are harder as they are all over the place, especially as they're usually double sided. This is how they're laid out in the Lake District:

The upper sheets, OL4 and OL5 aren't a problem: they're rectangles, but the lower sheets, 0L6 and OL7, aren't. The good news is that each side of the sheet is a simple rectangle so I just coded each side as a separate sheet in my data structure. It's fiddly (and I got one of the sheets wrong first time) but it's done now and it works a treat. When Beth uploads a track from the GPS as well as filling in the other fields it now fills in the maps fields too.

What came out of all this work however, and in fact I finished coding this part first as it provided debug to check I was getting good results, was that if you start entering a route on either of our mapping sites12 a new 'maps' link appears. Click it and you get a list of the 1:50K Landranger maps through which your route passes. Each map listed is a hyperlink to a page with more information about the map.

Do that in the Lake District and you get the 1:25K Outdoor Leisure maps too.

I'd like to do 1:25K Explorer/Outdoor Leisure for the whole of the UK but I don't have the coordinate data to do it. Yet.

  1. openmaps.the-hug.net - using Open Data map tiles and our server
  2. maps.the-hug.net - using OS OpenSpace map tiles and server

Tags: JavaScript, maps, WalkLakes, websites Written 31/03/13

Comment on this article

«
You can follow these posts on Twitter at @Wibblings
»
I am currently reading:

Faster, Higher, Farther by Jack Ewing The World of Mr Mulliner by PG Wodehouse

(?)
Word of the Day:
fakelore