OpenStreetMap logo OpenStreetMap

SomeoneElse's Diary

Recent diary entries

As there have been lots of updates recently, I’ve made a new release of all of the code behind map.atownsend.org.uk

There are releases for four repositories - the lua code that does all the hard work, the map style that determines what it looks like, the map legend, and the website for the map itself.

Here’s a summary of what’s new:

Natural features

Rocky features are now shown in more detail:

See full entry

Location: Seamer, North Yorkshire, York and North Yorkshire, England, United Kingdom

Community.osm.org - how's it going?

Posted by SomeoneElse on 25 March 2023 in English. Last updated on 28 March 2023.

The new forum “community.osm.org” has been going for a while now, so maybe it’s useful to have a look at how things are going.

There’s obviously lots that goes into creating that forum as a site where people can share ideas - there’s the forum software itself, and the people looking after the technical administration of the site, the migration of the old forum (which has just happened) and the help site (planned for later), the various implementation decisions that got us to here, and also the people looking after content moderation (which is more actively managed than before). Of all of these, this diary entry is really only about the Discourse software itself.

I’ll not comment here about the future migration of https://help.openstreetmap.org/ to Discourse and the work required within Discourse to support that, since it would be unfair to judge something that has not happened yet.

Full disclosure - I’m one of the moderators of a couple of categories in the forum, but this is very much a personal view.

What’s good:

The software is actively maintained, unlike the old FluxBB forum software, or OSQA, which is used for the help site.

It’s working! Some communities that might have been a bit quiet or spread over private forums are now able to talk together much easier than before.

Searching works, with some caveats around the UI (see below for that). This may sound obvious, but mailing lists search at for example talk-gb can be a bit of a pain to use - a page such as this only shows the subject and the name of the poster, not the date of the message.

You can avoid “me too” answers (but see “reaction icons” below).

There’s a translate button on every post that supports the most common languages. This reduces the “echo chamber” effect that some forums had previously (and some other OSM channels still do now).

See full entry

Location: Lunyo Estate, Katabi, Virus, Entebbe City, Central Region, Uganda

Windows Subsystem for Linux

Posted by SomeoneElse on 25 January 2023 in English. Last updated on 30 March 2023.

This isn’t directly related to OSM, but many times in “software” or “development” OSM channels someone has asked “how do I do X … on Windows 10?”.

The reason that’s often a question is that, for historical reasons, much of the OSM software used to do things has been developed on Linux. That’s great for people working on Linux themselves, and the Apple Macintosh users can normally jury-rig something to run that software too.

Windows users can do the same too, by installing “Windows Subsystem for Linux”. Within Windows, search for “Windows Features”:

In Windows Features, tick the box for WSL and click OK:

See full entry

When is a path not a path?

Posted by SomeoneElse on 16 January 2023 in English.

Just after the New Year, there were a few reports of people getting stuck and having to be rescued while hiking in the English Lake District.

There are writeups of this in “The Great Outdoors” magazine here and on Alex Roddie’s blog here. They really are worth reading - the consensus on IRC, Mastodon etc. was that the quality of the article was streets ahead of what you might expect to see in the generalist national press.

Lots has been written about how map and app developers can try and convey information to a user beyond “this is a way of getting from A to B” (including an OSM diary entry that I wrote in December 2022), so I won’t go over that again.

However, one particular quote from the Great Outdoors article did stand out for me, and it’s this:

A spokesperson for Keswick Mountain Rescue Team, which carried out the rescues, said: “There is no path via this route – only a scramble of loose scree which also requires the walker to negotiate the rocky outcrop of Slape Crag. It’s the scene of previous callouts.”

The reason why that stood out is that “path” can mean different things to different people:

  • an actual signed path suggesting that people on foot are encouraged to go via a particular route. In England and Wales there’s the concept of “public footpaths” (and public bridleways), which is a legal right of foot (and horse) access across what might be otherwise private land.

  • some indication on the ground that people often go via a particular route

Often the two coincide, and “where you’re supposed to go” matches “where people do actually go” correspond. Sometimes, however they don’t.

See full entry

Location: Old Kiln, Helmsley, North Yorkshire, York and North Yorkshire, England, YO62 5HL, United Kingdom

How to show paths on a map?

Posted by SomeoneElse on 11 December 2022 in English.

(or, what’s wrong with the general purpose map on my phone that just seems designed just to show me adverts?)

I decided to write this after reading some of the comments on the wiki here and in the community forum here.

People tend to view “things that appear on a map” as “somewhere that they can go”. For example here:

A stroll up Everest

someone who didn’t do their research properly might think that they can just wander along that path to the top of Everest from the south, despite the underlying data suggesting “difficult alpine hiking”. This diary entry is an attempt to try and avoid such misunderstandings.

What options does a map have to different things?

The map at map.atownsend.org.uk shows linear paths and tracks as a single line, It shows legal rights of way (some special categories in England and Wales) and also tries to give some indication of what a walker might expect on that path.

See full entry

Location: Isle of Wight Donkey Sanctuary, Ventnor, Isle of Wight, England, PO38 3AA, United Kingdom

Permalinks at map.atownsend.org.uk

Posted by SomeoneElse on 4 December 2022 in English.

The problem

Historically, the map at map.atownsend.org.uk didn’t change the URL as you moved around, and you had to press a “permalink” button to save the current location. This wasn’t ideal, so I had a look around for alternatives. Helpfully, the Leaflet site has a list of suitable plugins. Of those, leaflet-hash was suggested elsewhere. That seems to be still in use, although it hasn’t been updated for a while. It is spectaculary easy to use, and “does what it does” with no problems.

The challenge is that it stores the current location (for example “https://map.atownsend.org.uk/maps/map/map.html#11/54.4900/-3.1098”) but doesn’t store the current layer. That map currently has a choice of 5 base maps (test instances have 6) and 5 overlays:

Layer selector

How to solve this

See full entry

Location: LCPs of Fylingdales and Hawsker-cum-Stainsacre, North Yorkshire, York and North Yorkshire, England, YO22 4QB, United Kingdom

Garmin GPSMap64S screenshot

The OSM wiki contains links to various downloads for Garmin maps, as well as some information about creating your own from OSM data.

For many years now I’ve used maps on Garmin devices that I’ve created myself. I’ve done this so that I show things like England and Wales public footpaths and bridleways that I’m not aware that other maps can show. Until now, I’ve never quite got around to making the mechanism publicly available, or indeed the maps themselves. I’ve finally got around to fixing that.

The “readme” here explains how to run the script yourself, if you want to do that. If you don’t, you can download the latest files for Great Britain. New maps should appear there about weekly.

Differences between these maps and other maps for Garmin devices include:

See full entry

Location: Whenby Lodge South, Sheriff Hutton, North Yorkshire, York and North Yorkshire, England, YO60 6QN, United Kingdom

Switch2OSM.org Serving Tiles - Updating your database as people edit

Posted by SomeoneElse on 26 July 2022 in English. Last updated on 27 July 2022.

Munin

Since the release of Ubuntu 22.04 LTS, it’s now much easier to keep a tile-serving database updated. This version of Ubuntu ships with much more recent versions of osm2pgsql and osmium, so it’s easier to set up updates using those.

First things first, the new “setting up a rendering server” instructions for Ubuntu 22.04 are here. These are much shorter than they used to be because most of the software setup is done automatically as it is installed.

osm2pgsql-replication

See full entry

Location: Crossmoyle, Clones Urban ED, Ballybay-Clones Municipal District, County Monaghan, Ulster, Ireland

It’s been a while since I wrote about updates here.

Map.atownsend.org.uk is a map style that started out as a fork of OSM Carto in 2014, when it was obvious that the direction of travel for that style was towards “a map that was nice to look at” rather than “a map that was useful”.

For example, here’s the area that I linked to then in OSM Carto now: Kelstedge on OSM Carto

See full entry

Location: Opportunity, Holt County, Nebraska, United States

Zero-waste Shops

Posted by SomeoneElse on 13 February 2022 in English. Last updated on 1 June 2022.

Food shop icons with 3 zero-waste versions

Over at map.atownsend.org.uk I use a wider variety of icons for different sorts of objects within OSM. I previously explained here how simple changes to a basic icon make it still recognisable as the basic object (“this is a pub”) but also convey more information (“this particular pub is wheelchair accessible, and has a beer garden”).

The same principle can be used with “shop” icons - a selection of different types of shops can be shown differently if they have one of the tags commonly used in OSM to indicate “zero waste” or “eco” shops. This is done here in the lua file that processes all OSM data before loading into the rendering database. In the case of “zero waste supermarkets”, the code looks like this:

See full entry

Location: Woodhouse Cliff, Hyde Park, Leeds, West Yorkshire, England, LS6 2EZ, United Kingdom

Flood-prone footpaths

Posted by SomeoneElse on 2 January 2022 in English.

One example footpath, shown in blue as flooded

In England, the Environment Agency has an extensive network of river level monitors that are used to provide flood warnings such as (at the time of writing) this one.

However, these alerts tend to be only issued when land or property is likely to flood, and there are many paths that flood much earlier. An example is here, where if the downstream station reads just over 1m, you’ll get your feet wet. The Environment Agency doesn’t issue a warning at that level because it’s well within the normal range, and the river’s still well within the levees that have been provided for it for the last 50 years.

See full entry

Location: Huntington, York, York and North Yorkshire, England, United Kingdom

Screenshot of Ubuntu release page

I’ve added a new page to the switch2osm guide: “Manually building a tile server (Ubuntu 21.04)”. The work that the Debian developers have done to include the required software inside Debian 11 is now in Ubuntu 21.04, so there’s actually less setup work needed than in previous Ubuntu versions.

Ubuntu 21.04 isn’t an LTS release, so Debian 11 or Ubuntu 20.04 are still the recommended options for servers that are expected to stay around for a while. One of the regular faux pas with the Natural Earth download site has just been and gone, but the guide includes a workaround in case problems reoccur there.

See full entry

Location: Southwest, Derwent Valley, Tasmania, 7116, Australia

Checking for changes to Long Distance Paths

Posted by SomeoneElse on 30 July 2021 in English. Last updated on 15 October 2021.

Lyke Wake Walk relation in OSM - ways and nodes

Previously I wrote about checking National Parks in Britain and Ireland for breakage, by counting the number of valid polygons in a rendering database.

A similar approach can also be used to check line features as well as polygons. It’s possible to count the number of contiguous sections of a given polygon. For example, here’s the Lyke Wake Walk, which is in one piece:

psql -d gis -c "SELECT count(*) FROM planet_osm_line WHERE (osm_id = '-1996318');"
 count 
-------
     2
(1 row)

and here is the Sabrina Way, which isn’t:

psql -d gis -c "SELECT count(*) FROM planet_osm_line WHERE (osm_id = '-537430');"
 count 
-------
    12
(1 row)

If something is changed in OSM that introduces an extra piece, or fixes a gap, that number will change. This script can be used to count the change in the number, like this:

Change in relation components for Sabrina_Way 537430
3c3
<     12
---
>     13

See full entry

Location: Stainton Hall Farm, Danby, North Yorkshire, York and North Yorkshire, England, YO21 2JH, United Kingdom

Taginfo is a way of finding out what tags and values are used within OpenStreetMap. There’s a worldwide instance here, and other instances exist, including various Geofabrik ones such as Antarctica here.

As well as describing keys and values used within OpenStreetMap, the worldwide instance of Taginfo also holds details of what other projects use particular OSM tags. The Taginfo/Projects page explains the update process.

Each project submits a .json file containing details of key and value usage, such as this one for an OSM Mug.

The one for the map style that I look after is here. Currently I’ve just submitted a list of keys, not values, but I have included a description for each one, as can be seen here for “designation”.

The first challenge was to create the initial list. There are references to tags in three main places in my map style - the lua style file, the carto .mml file and the individual carto .mss files such as this one. A bit of investigation (creating a unique sorted list of strings within style.lua on one hand and .mml and .mss files on the other found that although some keys do pass through style.lua unchanged, almost no keys that are later used in carto files aren’t mentioned in style.lua at all. That means that I only needed to worry about keys in style.lua. I created an initial .json in the correct format and then wrote a shell script to generate the “tags:” section of the .json file. I then filled in the descriptions where the shell script had just created placeholders, and checked it in.

Next, I wanted to be able to easily update the taginfo.json file after changes to the map style. Because I’ve also checked the previous generated file into github I can easily create a new one and compare the two:

sh -x ./taginfo_lua_genkeylist.sh > q.txt
diff taginfo_lua_nodesc.txt q.txt

for the most recent change the output of that is:

See full entry

Location: Wilmington, Stoneferry, Hull, Kingston upon Hull, Hull and East Yorkshire, England, HU8 8BZ, United Kingdom

Adding a resource to the OpenStreetMap Community Index

Posted by SomeoneElse on 7 February 2021 in English. Last updated on 14 June 2022.

The OpenStreetMap Community Index is designed to show people what community groups there are within OpenStreetMap, in any part of the world. If I look near me I see a local pub meeting (sadly on hold during the pandemic), some country-level resources, and then international resources.

On a couple of occasions I’ve seen things that are missing or need updating, and this diary entry is designed to complement the existing documentation to describe what needs to be done to fix that.

Creating a local copy

In my case I already have a fork of https://github.com/osmlab/osm-community-index at https://github.com/SomeoneElseOSM/osm-community-index. There’s a “fork” button in the top right of Github’s UI that allows you to do this.

Next, I’ll create a local branch to work on. The default branch at https://github.com/SomeoneElseOSM/osm-community-index is “main” and the UI will say “This branch is even with osmlab:main.” because (in your case) you’ve only just created it. In github’s branch selector just type the name of the new branch to create. In this case I created “add_forum_at_world_level”, because I noticed that there wasn’t a link to the OSM Forum at the international level, although there are many links to country-level forums from the community index.

Next, “git clone” your repository wherever it is you want to work. I’m working on a completely new virtual machine to do this, so I have to take a slight detour first - see “setting up ssh access to github” below. Once that’s done:

mkdir ~/src
cd ~/src
git clone git@github.com:SomeoneElseOSM/osm-community-index.git
git checkout add_forum_at_world_level

Note that I’ve used a version of “git clone” that is designed to work with ssh. Github is (rightly) moving away from password-based verification and will send you a warning email if you try and use a password during the transfer period.

See full entry

Location: 21.871, 33.737

Running Potlatch 3 on Linux

Posted by SomeoneElse on 28 January 2021 in English. Last updated on 1 February 2021.

As you will no doubt have heard, browser support for flash went away at the end of last year. As you can read here, Potlatch 3 has been released and downloads for Windows and Mac are available. Linux users are asked to “Use Wine to run the Windows installer”. You may be wondering “why?” - there’s a section at the end of this diary entry that covers that. First, the “how”:

What do I need to do?

There are lots of different Linux distributions out there. Most have some sort of package manager and in most of those “wine” will be available as a package. Here is what I needed to do on a couple of desktop Ubuntu systems (both using KDE) - one running 18.04 LTS, the other 20.04 LTS.

Firstly, install Wine itself:

sudo apt install wine64

Next, you’ll probably need to install some fonts that software that normally runs on Windows needs. You can do this via a helpful script Winetricks. First, install cabextract, which is needed by the script:

sudo apt install cabextract

Next, decide where to install the “winetricks” script. I’ll put it in an existing user “bin” directory, so:

cd ~/bin
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks

Next, install the fonts:

winetricks corefonts

Finally download Potlatch 3 (choose the “Windows application” option, which is a zip file) from the download page, unzip it, and run it:

wine64 Potlatch.exe

Follow the instructions that are presented and accept the defaults to “just install” it.

Running Potlatch 3

When Potlatch runs, you’ll initially see the whole world zoomed out. Rather than zooming in manually you can then “edit with remote control” from the openstreetmap.org site to go to wherever you are currently looking at there, and you can also search for any sort of OpenStreetMap URL to jump straight to it. “GPS / My tracks / load” loads GPS traces.

See full entry

Location: Incline Village, Washoe County, Nevada, United States

Missing National Parks

Posted by SomeoneElse on 29 December 2020 in English. Last updated on 30 December 2020.

National parks and AONBs in northern England

Occasionally, I (like other people I’m sure) have noticed that things “disappear” from maps they should appear on. In the case of “national parks” and “areas of outstanding natural beauty” in the UK, they’re mapped as multipolygons. This might be simple, like Nidderdale or more complicated, like Ynys Môn. What usually happens is that someone accidentally “breaks” the multipolygon, for example by creating a gap in an outer edge, so that rendering software sees it as invalid and ignores it.

What I’ve typically done in the past is, whenever I’ve noticed a problem tried to find the problem using something like the OSM Relation Analyzer or JOSM’s validator. The “area” view at Geofabrik’s OSM Inspector is also useful.

That works, but “happening to notice a problem” as a first step is not ideal. This map does show national parks / AONBs and not a lot else at zoom 7, but those tiles only typically get updated every 4 days, so it can lag behind problems.

See full entry

Location: Craswall, Herefordshire, England, United Kingdom

Screenshot of switch2osm page

I’ve added a new page to the switch2osm guide: “Updating your database as people edit OpenStreetMap”.

It’s a bit overdue (it’s based on something I wrote about 4 years ago, and the software it uses predates that by a long way), but I think it is worth making available on the main site.

I’ve tested it both on Debian 11 and on Ubuntu 20.04 LTS, and have tried to make clear what you need to do differently in each case.

For completeness see also Ircama’s excellent guide which is well worth reading as it actually provides a lot more detail about the process, and also suggests how “osmium” may be used instead of “osmosis” to process OSM files.

Location: Golden City Phases 3, 4, & 5, Salitran, Dasmariñas, Cavite, Calabarzon, 4114, Philippines

Screenshot of switch2osm page

I’ve added a new page to the switch2osm guide: “Manually building a tile server (Debian 11)”. The Debian developers have worked to include the required software inside Debian 11, so there’s actually less setup work needed than in previous versions.

Debian 11 has not yet been released; it’s still “testing”, so there may be minor changes along the path to release. Also, there’s currently a temporary problem with the Natural Earth download site that requires a workaround, but that’s documented in the guide. When that is resolved I’ll update the notes.

I’ve not yet linked the new page into the menus because I want to give people a chance to test it and identify any problems first. Once that’s happened, I’ll add it to the “Serving Tiles” menu.

Location: Kolonia Łabędnik Mały, gmina Bartoszyce, Bartoszyce County, Warmian-Masurian Voivodeship, Poland

Pubs "closed due to Covid"

Posted by SomeoneElse on 15 August 2020 in English.

Unfortunately, in England at the moment a number of pubs aren’t able to reopen because (especially locally to me) they’re too small and have lots of small rooms or they’re music venues for which “social distancing” somewhat defeats the object of the event in the first place.

I’ve chosen to show these on this map like this:

Fulford Arms

This is deliberately different from the rendering of “normal” closed pubs:

See full entry

Location: Rosedale West Side, North Yorkshire, York and North Yorkshire, England, United Kingdom