OpenStreetMap logo OpenStreetMap

amapanda ᚛ᚐᚋᚐᚅᚇᚐ᚜ 🏳️‍⚧️'s Diary

Recent diary entries

Well this is an interesting JOSM issue. Whenever I try to use the building tool to draw a building, it goes circular! (Update 17 March: This is a feature, which you can toggle, see comments below)

Bad building

This happens only on one of my machines. On another, it works fine. I suppose I should nuke my JOSM settings and start afresh.

Terry Pratchett was a comedy fantasy author from Britain (which is an island of the coast of France). He is best known for the Discworld series of books (41 in all). He died in 2015, and as a tribute, fans around the world changed their servers to emit a hidden code with his name, taking cue from one of his books.

I wanted to do this in OpenStreetMap. We don’t want to change the OSM data, but the changeset tags are the secret metadata of OSM. In keeping with OSM convention of new tags, I’m choosing clacks_overhead=GNU Terry Pratchett. If you add that tag to your changesets, you can keep pTerry alive in the OSM metadata.

I’ve created a JOSM plugin (pTerry) to do this automatically. If you have a recent version of JOSM (v13028 or above, released today). For now, just download pTerry.jar and save it to ~/.josm/plugins/. I’ll put it on the JOSM plugins list in a bit when I know it’s OK.

A man is not dead while his name is still spoken.

KeepRight is a data consistance and quality assurance tool for OSM. It’s been around for years and years (since at least 2009). I used it ages ago and forgot about it. But it’s still around, still updating, still checking OSM. Some of the checks don’t make sense everywhere, so use your head and mark things as false positives if needed. If you’re looking for some mapping & gardening, open it up, have a look at an area and fix up the map.

OpenStreetMap allows people to add notes to the map, people can comment and mark a problem as resolved. This is an easy way for mappers to talk to each other (“Is this mapped right?” “Yes I was there the other month, the aerial imgaery is old” “OK So”), and is an easy way for non-OSM people to provide simple feedback without needing to log in, and (importantly) not break the map if they don’t know what they are doing. Experienced mappers can use them to highlight areas or issues they think should be addressed.

There are now more than 1,000,000 notes in OSM. There was some discussion on the OSM main mailing list about this. Some people don’t like how easy it is for some apps (Maps.me) to add notes, and complain about the amount of useless notes. Yes, a high signal to noise ratio can make things hard. However OSM is open and a wiki map. There shouldn’t be barriers and gatekeepers. If you want only “approved” people to be able to add data to your map, go play with Google Map Maker.

The concern about signal to noise ratios is valid. There are a lot of notes now. About 250,000 open notes. (check on pascal neis’ notes page).

So I’m going to make an effort to look at notes and try to fix up problems. Some cannot be solved from the armchair, but there are lots of new users leaving notes that can be closed, or which describe things which have since been mapped. And some are things you could map. I’m going to work my way through some of the notes in Ireland.

If we all take a few minutes each day to look at notes that people are submitting, we’ll keep the map updated and fixed up.

OSM can never be finished, we just keep improving the map. Our tools and sources get better. We can get better aerial imagery, and this means older data can be a little fuzzy. There’s a simple way to improve OSM by looking at old data and seeing if you can improve it.

First enable the TODO list plugin if you haven’t already (seriously, it’s a great plugin), and enable that window on the right hand side. Then download a large area. The JOSM Continuous Downloader plugin can help here. The we can use JOSM’s search functionality to find old data. Let’s try to fix up ways which haven’t been changed since 2010. Press Control-F to bring up the search box. Then enter timestamp:/2010 type:way, and press enter. All old ways will be selected. Press the Add button to these to the TODO list. Double click on the first entry to start working on it. Compare it to the aerial imagery, and fix up it’s geometry if needed. JOSM’s improve way geometry feature (press W) can make this easier. When you’ve finished with this way, press ] to go to the next object. Keep going as long as you want. Upload as often as you want.

With regular “gardening” tasks, OSM will be gradually improved and made better.

Recently some players of Pokemon Go think that OpenStreetMap data is being used as data in the game, and by editing OSM they can force new things to appear in the game.

Some people don’t like this swarm of newcomers, and rightly point out the bad, incorrect data that people are adding. Sometimes these newcomers are using Google Maps without a full understanding of what copyright is, and why that’s not allowed in OSM.

I’m skeptical that Niantic are actually using OSM data this way. They may be using a static dump, but it’s pretty rare for external, non-OpenStreetMap, companies to have a continuously updated database from OSM.

New users are always welcome, and if they are adding correct things, then I welcome them. It’s always good to have new mappers, adding things for an area they are in. Pokemon Go is a game you play by going outside and walking around, so these people are adding data to their neighbourhood, which can often be better than remote mappers with no idea of the local area.

I am using Osmose to find and fix polygon errors in Ireland. I fixed a problem in a golf course in Youghal, Co. Cork. I could have stopped there, and moved on, however the JOSM validator found some errors, so I kept working on that little area. This led me to spot some not great mapping around a school. Some houses tagged with name=Residential Dwelling, that kind of thing. I cleaned up the area. Removed unneeded name tags, fixed tagging of roads etc. I found the mapper, and changeset where this was added, and was able to leave a changeset comment on it. I’m not the first to notice, but maybe this mapper might return to OSM.

So I feel like I have improved the map in this area. I would not have known to look there if I hadn’t use a QA tool like Osmose, or the JOSM Validator. However if I was just looking at closed polygons, then I would have stopped as soon as I fixed that polygon, and moved on.

At State of the Map 2016, Frederik Ramm talked about Mechanical Edits, and one problem he finds with mechanical edits is that sometimes people just mechanically and automatically fix the problem that the QA tool has found, rather than looking at the area, or other contributions from the same mapper, and try to fix the larger problem, and fix other problems. There is often talk about more automatic and manual imports, with some suggesting that humans are expensive, let’s not use them too often. But you need to have humans there, to find and recognise other mistakes which the tool can miss, as my example shows.

Using Osmose to fix admin boundary errors

Posted by amapanda ᚛ᚐᚋᚐᚅᚇᚐ᚜ 🏳️‍⚧️ on 18 December 2016 in English. Last updated on 20 December 2016.

Over the past few days I have been using Osmose (docs) to find errors in administrative polygons in Ireland. OpenStreetMap does not have a native area type, so we have to create type=boundary relations. It’s easy to break these areas, which means software which wants to extract boundary data from OSM is unable to “see” these areas.

As someone who consumes OSM data for administrative boundaries (Townlands.ie for townlands in Ireland), I have a certain affinity for admin boundaries in OSM in Ireland, and would like T.ie to be as good as possible, and that’s possible if the OSM data is the best possible.

I’ve been turning off all checks in Osmose and enabling just the open polygon error. Click on each blue marker to open the popup with details. Then click the “josm” link for the relation with the problem, which will load that relation in JOSM using JOSM’s remote control. The JOSM validator will then tell you where the open polygon is. You should then look at the problem and see what’s wrong and how to fix it. The most common error is a small gap, and there’s a missing way that you need to (re-)add to the relation. However I have seen more complicated errors sometimes.

Osmose will update regularly, but it can take a day before it’s updated, so the “polygon error” will still be on the website. You can click on the “corrected” link in the popup to tell Osmose that this problem has been fixed. The popup & marker will then disappear from the map (for everyone). You can then clear the errors and work on the next problem. Sometimes I’ve seen many copies of the same error on top of each other, so if you click “corrected” and it looks like the popup & marker don’t disappear, it probably did get recorded as corrected, it’s just that there’s an identical error in the same place which you’re seeing. Just click “corrected” on all of them until it goes away.

Townlands.ie now displays the historic name of areas! Townlands.ie is a website which shows the Irish traditional boundaries in OpenStreetMap, like townlands, civil parishes, baronies and counties. It’s very useful for Irish genealogical research, and mainting Ireland’s heritage into the digital era.

An example of this is County Offaly, which was initially created as a county in 1556 as “King’s County”, and was known as that until Irish independence in 1922, when it was changed to County Offaly. Neighbouring Co. Laois was known as “Queen’s County”.

We use the date namespace suffix to support this. The current OSM relation for Co. Offaly shows how to add this data: name:1556--1922=King's County, name:1922--=County Offaly

Townlands.ie currently supports the following 3 forms. Other options may be added later.

  • name:--YEAR: Name before YEAR
  • name:YEAR--: Name from YEAR to the present
  • name:YEAR1--YEAR2: Name between the years YEAR1 and YEAR2

There is already support for adding the name Griffith’s Valuation (with name:griffithsvaluation tag), and the 1901 and 1911 census names (name:census1901 and name:census1911). However that is often used for transcription errors.

Please add more historic names to OSM in Ireland!

Waterway relations

The waterway=river tag is used in OSM on ways that make up a river. Like many things in OSM, an actual river will almost certainly be split up into many individual ways. Luckily there is a waterway relation. You can create one relation for each actual river, and then add all the ways that make up the river into that relation. Data consumers can then easily work with one object for a river and reason about it. (e.g. How long is it? What countries is this river in? What other rivers flow into it?)

Using Overpass to find missing waterway relations

Adding rivers to the relation is easy enough. But how do you know how to find them? Overpass Turbo can be used for that.

This overpass query will show you all the rivers in a bbox which are candidates for a waterway relation:

[out:json][timeout:250];
(
  // all ways that are tagged river, and have a name
  way["waterway"~"(river|stream)"]["name"~"."]({{bbox}});
  -
  // minus all the ways that are in a relation
  ( relation["type"="waterway"]({{bbox}}) ; > );
);
// print results
out body;
>;
out skel qt; 

It find all ways with the waterway=river or waterway=stream tag, that also have a name tag, and it excludes all ways that are already in a type=waterway relation.

Loading into JOSM

When you have run that query in Overpass Turbo, you can export the result to JOSM using the remote control feature of JOSM.

However JOSM has a very useful “Download from Overpass API” feature for loading data direct into JOSM, if you want to avoid your browser having to load and display a massive amount of data. However you must use a slightly different overpass format. Instead of {{bbox}} use bbox. This is the query you need for JOSM:

(
  // all ways that are tagged river, and have a name
  way["waterway"~"river|stream"]["name"~"."](bbox);
  -
  // minus all the ways that are in a relation
  ( relation["type"="waterway"](bbox) ; > );
);
// print results
out meta;
>;
out meta;

Examples

See full entry

As I said on talk-ie, I have finally made an import of the Logainm data. I used the import account rorym_import_logainm. I imported it in 2 goes. First just the baronies (which was only 6 missing), to test that the import worked. That was changeset 37805913. Then I imported the rest, in 3 changesets 37807910, 37807270 and 37806626

All in, I updated 20,506 objects. About 56% of civil parishes were able to be matched up, and 39% of townlands. The main reason for the low number is due to how the script matches up. For CPs, it looks at the barony it’s in, and checks the logainm id of that, and then looks for an exact name match. If the barony has not been mapped, then it can’t match up. Likewise, for townlands, it looks at the CP. No CP mapped and the townland can’t be matched up. There is a lot of areas where only townlands are mapped. If you want to improve Logainm importing, please add more baronies and civil parishes.

There were many cases where an exact name match wasn’t found. I haven’t looked into this yet, but I suspect it might be just misspellings, or things like that.

It takes a long time to upload 20,000 objects with JOSM. :)

I plan to continue to work on this, improve the script, and re-run imports as more OSM data is added. You can follow it on the user diary for the import account.

In the UK they are doing a quarterly project to map more schools and there is a list of schools in Ireland from the Department of Education, but that only has addresses, not locations.

I thought I’d download that file and throw it at Nominatim and see if we can’t geocode those addresses, and have something to work with. I thought with all the mapped townlands, that Nominatim might be OK at some of the rural addresses.

The results are not good.

Nominatim returns a bounding box for a result. Here’s what happens when you try to geocode all the primary schools:

ireland

The big boxes are where nominatim was only able to get the county. You can see that many other boxes are just around towns and villages. Nothing more detailed than that. The map might as well be a map of “Counties and Towns of Ireland”, which is useless for locating schools.

See full entry

OSM is a mapping project, but sometimes people write software to do stuff with OSM. Irish Townlands is one example of this. And that code (like much in OSM) is open source (see it here), and I use Github, since it’s so popular for open source.

So I set up a Github organization for us! Here: OpenStreetMap Ireland If you’re a Github user, feel free to join (on-line, or contact me and I can add you). I’ve already transferred the townlands.ie source code there. Feel free to transfer any other projects on github there.

The server that Townlands.ie is no longer has enough disk space to import new townlands data. OpenStreetMap data just keeps growing! I’ve ordered a new, larger, server. When it set up and functioning again, it should update again. Until then townlands.ie will not show any new townlands (etc) that you add.

Apologies for any inconvenience.

Who’d like to help translate townlands.ie into Irish (or any other language)? I’m learning German, so I’ll translate into German.

Since t.ie is django, and hence a dynamic website, it splits the text on the website into lots of little chunks, and you translate them one by one.

I’m going to use Transifex, the website, to do the translation, so you don’t need any special software, it’s all web based. There’s a little complication with pluralisation (esp for Irish), but I can explain it. You don’t need to have any experience with computer translations (“i18n”/”l10n”), just be able to speak the target language close enough. I’ll explain it.

Right now, townlands.ie is only available in English, but when there is enough translations done for a language I’ll enable that language.

Here is the Transifex project page, please feel free to sign up and ‘request’ to join.

Any takers?

In Ireland, we are adding townlands based on some old GSGS sheets. Read more here

As well as townlands, these are great for adding names of features, such as lakes. Overpass Turbo can help with this.

If you go to this Overpass page and zoom to an area and press “run”, it will show you all unnamed lakes. Then “Export”, then “JOSM”. It’ll have opened up those unnamed lakes in your JOSM. Use the GSGS maps to add the name (and “water=lake” as appropriate). You don’t need to download any extra data. Upload when done!

It’s surprising how many unnamed lakes there are in OSM, and this can help you really knock some off.

I use JOSM’s filter feature, with the query “name=* and water=*” to hide lakes that I’ve already named. This makes it easier to work through the items.

Several years ago, I made a simple map of the hackerspaces in OSM, using the leisure=hackerspace tag. And it used XAPI. And XAPI broke a while ago. So the map didn’t update. In the last month about 10 people have emailed me to tell me it isn’t updating. Everyone must be looking at it now! So I’ve fixed it, and it should update now!

http://www.technomancy.org/osm-hackerspaces/