Blame data/city-fixups.pl
|
Packit Service |
4897fc |
#!/usr/bin/perl
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
binmode STDIN, ":utf8";
|
|
Packit Service |
4897fc |
binmode STDOUT, ":utf8";
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
while (<>) {
|
|
Packit Service |
4897fc |
# Drop apparently-duplicate cities
|
|
Packit Service |
4897fc |
next if /-364867.*Tacna/; # Tacna, Peru
|
|
Packit Service |
4897fc |
next if /6034170.*Bujumbura/; # Bujumbura, Burundi
|
|
Packit Service |
4897fc |
next if /-225337.*Akita/; # Akita, Japan
|
|
Packit Service |
4897fc |
next if /10074674.*\tIR\t/; # Tehran, Iran
|
|
Packit Service |
4897fc |
next if /-3414440.*\tTH\t/; # Bangkok, Thailand
|
|
Packit Service |
4897fc |
next if /9026906.*\tWarszawa/; # Warsaw, Poland
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
# "Zürich" should be listed with an English name of "Zurich"
|
|
Packit Service |
4897fc |
if (/-2554935.*Zürich/) {
|
|
Packit Service |
4897fc |
# print the local name
|
|
Packit Service |
4897fc |
print;
|
|
Packit Service |
4897fc |
# change the data, then fall through to print that as well
|
|
Packit Service |
4897fc |
s/\tN\t\t/\tC\teng\t/;
|
|
Packit Service |
4897fc |
s/Zürich/Zurich/;
|
|
Packit Service |
4897fc |
}
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
# The capital of Mexico should be "Mexico City" in English, not just
|
|
Packit Service |
4897fc |
# "Mexico". #171718
|
|
Packit Service |
4897fc |
if (/-1658079.*\tC\teng/) {
|
|
Packit Service |
4897fc |
s/MEXICO\tMexico\tMexico\t/MEXICOCITY\tMexico City\tMexico City\t/;
|
|
Packit Service |
4897fc |
}
|
|
Packit Service |
4897fc |
|
|
Packit Service |
4897fc |
print;
|
|
Packit Service |
4897fc |
}
|