Mechanical Edits/Mateusz Konieczny - bot account/adding wikipedia and wikidata tags based on teryt:simc tags and Wikidata in Poland

From OpenStreetMap Wiki
Jump to navigation Jump to search

Page content created as advised on Automated_Edits_code_of_conduct#Document_and_discuss_your_plans.

Who

I, Mateusz Konieczny using my bot account

contact

message via OSM I will respond also to PMs to the bot account. In both cases I will be notified about incoming PMs via email and notifications in OSM editors.

What

Adding wikipedia=* and wikidata=* tags based on teryt:simc=* tags and part of Wikidata database that was created from Public Domain resources (documents published by Polish government).

Editing is restricted to Poland and it makes no sense to run it anywhere else as teryt:simc code is assigned only to settlements in Poland. In case of interest it is possible to easily adapt code to make similar edits in other regions.

Why

Both teryt:simc=* and Wikidata database describing Polish settlements were imported from official resources published by Polish government. As identifier of settlement assigned by government is stored in both of databases (teryt:simc=* in OSM and https://www.wikidata.org/wiki/Property:P4046 in the Wikidata it is possible to easily link these two databases by adding proper wikipedia=* and wikidata=* tags )

This process is highly tedious and bot making this kind of edit is less likely to make mistakes than a human.

Numbers

Initial run edited around 20k objects.

Ongoing edits depend on how many missing tags appear - depends on editing activity in OSM and Wikidata.

How

  • Editing is limited to cases where there is 1:1 relation between OSM element and Wikidata element (wikipedia link will not be added if any OSM element already links this wikipedia article etc)
  • Each changeset contains a single region
  • After every changeset bot sleeps for one minute

A theoretical example:
state before a mechanical edit:

state after a mechanical edit:


Changeset would be described and tagged with tags that mark it as automatic, provide link to discussion approving edit, link repository with source code etc


Discussion

Approved by Polish OSM community at https://forum.openstreetmap.org/viewtopic.php?id=59926

Repetition

This is reoccurring edit and may be made as soon as matching objects appear. At this moment triggering new edit requires human intervention and review so exact schedule is not predictable and bot may stop running at any moment.

Opt-out

Please write at https://forum.openstreetmap.org/viewtopic.php?id=59926 .