User:Kmpoppe/Automated Edits/Mapillary Update

From OpenStreetMap Wiki
Jump to navigation Jump to search


In June 2021 Mapillary retired Version 3 of their API which led to a significant change in how Image IDs were issued. While Version 3 Image IDs had the pattern [A-Z0-9\-\_]{22}/i, new IDs are numeric only with at least 15 digits.

To allow data consumers to work with API Version 4, all tags mapillary=* shall be changed to contain the new Image ID.


This statistic is up-to-date per August 26, 2022 (Date of tagInfo data). Values were grabbed from tagInfo and checked multiple times to reach the correct action for each value.

Type Description Proposed action Total #
All distinct values 242,541
Successful matches Old Keys that have successfully matched to a new Key. Change mapillary key during edit 200,496
Objects to be changed 218,263


Frédéric Rodrigo published a list of Old->New IDs as a gist On 1st Aug 2021. As per speaking with him he made it clear to me, that he'll not be doing the automated edit himself.

A discussion on Tagging-ML lead to the vague idea that an automated would be in order.

I checked back with @cbed32 (Chris Beddow) from Mapillary, who'll be providing ID-matches of those Old IDs that have popped up in OSM between August 1st and today as well as checking the "short IDs" if they can be found or have to be discarded.

Plan of Action

Until November 1st 2021 the list of Old IDs that need a translation into New IDs shall be finished and send to Chris Beddow for completion.

Until November 26th 2021 a list of changes (objects with mapillary IDs), grouped by country (or a smaller administrative unit if a country has more than 1000 objects) will be provided here for community information and discussion.

Between August 24th and 26th I made some test changes to see if the development against the Sandbox environment worked, with these Changesets being the preliminary "final" settings:

125406656, 125406660, 125406664, 125406669

On the first weekend of October 2022 the changes should be made by a special OSM user for this import.


  • On 21st Oct 2021, Geofreund1 single-handedly corrected around 70 entries where WUSCH1463 had mistakenly entered a ref-value into the mapillary-key. Thanks!
  • Since Oct 25th, all single translation maps are available and now have to be condensed into one map and a plan to get the corresponding OSM object will have to be drawn up.
  • On 28th Nov, the work table (distinct old->new values) is in a database for further proceedings. I have contacted KUMI SYSTEMS, who host an overpass instance about how they will be used to find the affected OSM objects.

How are the changes done?

A PHP script, running on my root server (hosted in Frankfurt, Germany), will use the OSM API to upload the changes.

Every mapillary ID will get its own changeset. This will result in the Edit-User having close to 200k distinct changes, but the advantage is, that every single change to one specific old mapillary ID can be reverted should any problems come to light.