Automated edits for name tags

Israel is multilingual and getting name tag consistency is tricky. This script helps with that. It copies name:en, name:he, name:ar to name and vice-versa in Israel.

Script pages:

The script is part of SafwatHalaby_bot. (Click for contact details, opt-out, other scripts, bot overview, etc.).

Sound good.

However, is this a real issue? How many such elements exist?

70, excluding west bank or gaza (getting overpass statistics for Israel controlled territory in west bank is a bit tricky).

(edit: far more than 70 in the newer algorithm. See below)

It’s not a serious issue at all but it’s trivially solvable and the scripts are ready to go. Wouldn’t have mentioned it except that some people don’t like unmentioned bulk edits.

If the problem/fix is not significant, IMHO it is not a. “bulk edit” that requires a discussion.

Ok. Will do it now. We have 538 including west bank and gaza (both IL and pl contolled territories). Perhaps I should ask their permission to also bulk-edit those areas too.


The other way around appears to be a bigger issue: Things that have name but no name:he or name:ar. This would involve language detection. I will update the algorithm and report back.

Local test for Haifa and Krayot with a new algorithm: (not uploaded)

Total modifications: 3685
Total name:en to name: 32
Total name to name:en: 503
Total name:ar to name: 0
Total name to name:ar: 0
Total name:he to name: 0
Total name to name:he: 3150

New algorithm:

  • If name exists, deduce language, if name:lang doesn’t exist for that language, copy name to name:lang. (If it exists, warn if the two names are different)

  • if only one name:lang exists, but name doesn’t, copy name:lang to name. (or warn if name:lang’s language isn’t really lang)

name:lang is currently only for he,ar,en.

Offline test for Israel + PL (not uploaded)

Total modifications: 77440
Total name:en to name: 743
Total name to name:en: 26520
Total name:ar to name: 435 **
Total name to name:ar: 3693
Total name:he to name: 1*
Total name to name:he: 46048

* Probably low because many have both name:he and (name:ar or name:en or name:ru) so
 the script doesn't know which one to copy and skips. Plus because of my previous run.

** Probably high because my previous run didn't touch most of PL.

Live test on a very small scale:

Places (villages, towns and so on) in OSM sometimes have both a node and a boundary (way or relation).
It is rather important all tags which exists simultaneously on both objects should be equal.
So different software will use the same tag value regardless where they get the data

Here is some list of such errors.
Different name:en on node and boundary for example

P.S. There are also a lot of non equal name (name:he) tags

Sounds like a good idea, but I think it should be on a separate script.

Actually, I don’t think a script can do it. You’d need a human to manually tell which is the preferred name, right?

Edit: At least partial automation is possible: I could also obtain a list of the official names, and assign higher priority to them, when there’s a conflict.

I just conducted a run on the northern district. Some problems cannot be auto fixed and need human help, they are mentioned in the changeset comment:

Changes applied to Haifa District. I’m going to pause for a few days to see if some issues arise, before doing the remaining districts.

Haifa errors that need human help:

It appears we have two different space characters in names.

\u00A0 - Unbreakable Space (NBSP)
\u0020 - Space (SP)

@wowik Many places have node, landuse=residential, and also an administrative boundary from the MOIN import. So that’s 3 places per … place.

Please note that massive updates are causing delays in the updates of the Israel Hiking and Biking maps.
Since 2-June it takes more than 36 hours to complete the maps updates, compared to 1-4 hours previously.

Also see

Thanks for notifying me!

  1. 99%+ of the changes were name to name:he copies. This should be a one-time load.

  2. I updated 5 of the 7 Israel districts in one week. I could have spread this over weeks had I considered the load. I will update the remaining 2 districts in 1 week intervals or more, and will pause the updates for now until things propagate properly.

  3. I am glad you reported this now. I was about to run it for the remaining districts.