Automated edits/hfs

From OpenStreetMap Wiki
Jump to navigation Jump to search

Automated edits by user hfs

The best way to contact me: Send an OSM message, or Send a private message in the community forums

FlixBus

FlixBus is a long-distance bus operator from Germany, with bus routes in Germany and other countries. Many of the bus routes are mapped in OpenStreetMap as relations route=bus.

Quite a lot of these routes have a website=* tag that points to a URL below https://www.meinfernbus.de/…. MeinFernbus was another bus operator that got bought by FlixBus in 2015. The website www.meinfernbus.de no longer exists, so all of these links are now broken.

There is no alternative website with a specific page about each route, detailing e.g. the intermediate stops and the timetable. https://www.flixbus.de/ has SEO pages for each start-destination pair of cities, but these are not very useful. They mostly serve to pre-fill the connection search and don’t tell you anything about stops on the route or timetables.

Here’s an Overpass query for the affected routes: https://overpass-turbo.eu/s/1G7O. At the time of writing there are 422 such routes.

Proposed change

Remove the website=* key.

Add network:website=* in its place. The rationale is that the link to a website where you can buy tickets, see departures/arrivals/delays or alternative routes might still be useful to some users, even if it’s not specifically about this route.

The website that will be linked to depends on the country of the start and destination. If start and destination are in the same country, link to that country’s version of the FlixBus website, such as https://www.flixbus.de/, https://www.flixbus.it/, and so on. If start and destination are in different countries, link to the global website https://global.flixbus.com/.

Here’s the list which link would be used as network:website for each of the relations: https://gist.github.com/hfs/fffbd3aa61a849e15c95e9c54906458d

As possible alternatives to network:website, website=* does not fit, because it is not a website about the specific route. operator:website=* does not fit, because the actual routes are served by subcontractor companies who own the buses and pay the drivers. For several routes they are tagged as operator=*. In these cases operator:website should rather point to the subcontractors’ websites and not FlixBus’.

How the change is performed

The Overpass turbo query https://overpass-turbo.eu/s/1G7O is used to find affected routes.

The relations are chunked by the value for network:website. The routes in Germany would become one chunk, the Italian ones the next chunk, and so on.

The data will be loaded into JOSM into a fresh session. JOSM allows to load objects by ID and can load relations without loading the members.

The website key will be removed from all loaded relations.

network:website=https://... will be added to all relations where network:website is not already present.

This tag change is the only change that will be performed. It will be performed only once. The changeset will be tagged with:

  • comment=Automated edit: Remove broken website, add link to network:website
  • mechanical=yes
  • description=https://wiki.openstreetmap.org/wiki/Automated_edits/hfs#FlixBus

I will practice the change by performing it only on 10 relations at first, wait a day for possible complaints and only then perform the change on all remaining objects.

Consultation and discussion

The topic was discussed in the community forum: Flixbus Routen-Relationen: Links auf meinfernbus.de (in German)

This automated edit was announced here: Mechanical edit: Remove broken website from FlixBus bus route relations

Timeline and changesets

2024-01-18: First forum discussion

2024-02-05: Mechanical edit proposed in community forum

2024-02-05: Wiki documentation created

2024-02-08: Update proposal after feedback

2024-02-17:Test changeset 147585752 with the first 10 relations

2024-02-18: Changed the remaining 412 relations in changeset 147623445

REWE supermarket brand Wikipedia link fix: brand:wikipedia=de:Rewe (Markt)de:Rewe

REWE is one of the largest supermarket chains in Germany. Many of these supermarkets in OSM are tagged with brand:wikipedia=de:Rewe (Markt) to link to the page Rewe (Markt) (“Markt” = market) in the German Wikipedia. Unfortunately this page no longer exists. It was deleted in January 2023. The correct page is now Rewe without the “Markt” suffix. The brand:wikipedia link should be fixed so that users are directed to the correct page.

How the change is performed

This Overpass turbo query is used to find affected objects: https://overpass-turbo.eu/s/1BAk

[out:json][timeout:25];
(
  nwr["brand:wikipedia"="de:Rewe (Markt)"];
);
out body;
>;
out skel qt;

At the time of writing 1393 objects are affected.

The data will be loaded into JOSM.

Search-and-replace will be performed to change all tags which are brand:wikipedia=de:Rewe (Markt) into brand:wikipedia=de:Rewe.

The German page de:Rewe is used as replacement, and not the English one en:REWE, because

  • this is a German supermarket chain and the affected objects are in Germany and
  • the objects linked to the German Wikipedia before and the new page is what the old page got moved to

This tag change is the only change that will be performed. It will be performed only once. The changeset will be tagged with:

  • comment=Automated edit: Fix brand Wikipedia link to renamed page
  • mechanical=yes
  • description=https://wiki.openstreetmap.org/wiki/Automated_edits/hfs#REWE_supermarket_brand_Wikipedia_link_fix:_brand:wikipedia=de:Rewe_(Markt)_%E2%86%92_de:Rewe

I will practice the change by performing it only on 10 objects at first, wait a day for possible complaints and only then perform the change on all remaining objects.

Consultation and discussions

This automated edit is dicsussed here: Community Forums: brand:wikipedia=de:Rewe (Markt) → de:Rewe.

Timeline and Changesets

2023-10-08: Edit proposed in community forum

2023-10-10: Creation of this wiki page

2023-10-14: Test changeset 142581786 with 10 changes

2023-10-15: Changed 1377 markets in changeset 142622523