I queried for invalid ICAO codes in OpenStreetMap. As an ICAO code always consists of exactly four letters (A-Z) this is easy to check. I found a total of 661 OSM elements with an icao tag not satisfying this definition and made a list.
My suggestion is to edit all of these and rename the key to fixme:icao.
I would suggest to rather ask people who mapped them.
You can automatically find changesets that added them and make changeset comments (this one also can be automated). I recently created code that can achieve this parts but I have not yet run it as a bot edit.
Or create notes in locations of this suspect tags.
Shuffling tags around seems to be less helpful to me. Especially creating new ones like fixme:icao.
Thanks - a list of “obviously invalid” codes is useful.
However, I’d suggest that you go through your list, and see if you can identify what each one should be. Is it an obvious typo or duplicate?
If not, does the airport even seem to currently exist?
Quite a few airports got dumped in OSM by “flytipping mappers in the earlier days of OSM”, and the community has been gradually been tidying up since.
Changing a tag to a “fixme” doesn’t really create anything actionable for the average OSM mapper that isn’t primarily interested in airports, a list (which you’ve linked to here) is just as useful.
For number 2 at least wikipedia indicates that it is a valid ICAO code. So it might be your list needs a bit more validation. It seems the codes are partly valid, partly maybe it’s a different code type. Changing the latter to fixme doesn’t help at all in my opinion.
The fourth, Node: Aeroporto de Cahama (331391771) | OpenStreetMap with the claimed code of FN17 (in Angola) isn’t military, but looks like it’s just runway, not any buildings, also making it less likely to have significant internet presence.
ICAO codes are not made freely available by the ICAO – so I think our best bet for confirming them would be claims by the airport themselves, or other sources that likely did buy access to the official list.
The list is probably better sorted by the codes, rather than by the node IDs as you have it.
After sorting it that way, I looked at the first one in the US, and confirmed it was incorrect (at least, based on Wikipedia not listing it), and removed it in: Changeset: 148078259 | OpenStreetMap
Shuffling tags around seems to be less helpful to me. Especially creating new ones like fixme:icao.
I agree, searching for this tag is not much easier than simply doing the same check you did: counting the letters. Fixing the problems is useful, adding a fixme less so.
As many airports with probably false icao-tag are in the US we might have luck to find an official list for the US at least (altough I didn’t). Does anyone maybe know if such a source exists?
I’m definitely not an expert but I think that specific Wikipedia article must be wrong. ICAO codes are four-letters (not numbers). From the ICAO Wikipedia page:
The ICAOairport code or location indicator is a four-letter code designating aerodromes around the world.
The ICAO document is not available online for free (instead is purchased here). From the description it says:
A listing of four-letter location indicators and, where available, corresponding three-character International Air Transport Association (IATA) location identifier codes for geographical locations throughout the world, and a list of the addresses of centres in charge of flight information regions (FIR) and/or upper flight information regions (UIR).
which again specifically says letters (not alphanumeric).
Furthermore, other websites (possibly not suitable for use in OSM so I’m just linking for reference) do not have an ICAO code for that airfield (e.g., [1],[2]) but do for other larger airports.
Edit: although the Isla Socorro Airport discussed above is showing on one of those sites with ICAO code of MM81. So who knows!
ICAO codes, assigned by the International Civil Aviation Organization, are four-letter codes. They’re used globally in flight operations and Air Traffic Control.
Small private-use airfields are a special case. They get two letters and two numbers, making up a four-character LID. There’s no chance of mixing these up with four-letter ICAO codes, as ICAO doesn’t use numbers in their airport codes.
So looks like the validation is correct. The ICAO code should only contain letters. Smaller airfields may use Location IDs (LIDs) that contain two letters followed by two numbers.
Looks like an awful lot of them, especially in the US, are LIDs rather than ICAO codes. You could tweak your overpass code to look for letter-letter-number-number codes in the US (presumably that’s possible in overpass?). I think these would then be candidates for re-tagging from icao=* to lid=* (or similar).