Fix geonames_process.awk

It missed several big towns because of a wrong condition
This commit is contained in:
Gergely Polonkai 2014-09-21 12:40:34 +02:00
parent 2fd0096ddd
commit 3bde2d68c0
2 changed files with 5 additions and 5 deletions

View File

@ -45,16 +45,16 @@ allCountries.zip:
fi; \
fi;
cities.txt: allCountries.zip
allCountries.txt: allCountries.zip
$(AM_V_GEN) if test -x $(UNZIP); then \
$(UNZIP) allCountries.zip; \
else \
echo "unzip could not be found in your PATH."; \
echo "It is needed to create geodata.xml!"; \
fi; \
if test -f allCountries.txt; then \
cities.txt: allCountries.txt
$(AWK) -f geonames_process.awk allCountries.txt > $@ ; \
fi
geodata.xml: countryInfo.txt timeZones.txt cities.txt
$(AM_V_GEN) if test -x "$(PERL)"; then \

View File

@ -2,6 +2,6 @@ BEGIN {
FS="\t"
}
{
if ($7 != "P" || ($8 != "PPL" && $8 != "PPLC") || $15 < 1000) next
if ($7 != "P" || ($8 != "PPL" && $8 != "PPLC" && substr($8, 0, 4) != "PPLA") || $15 < 1000) next
print $9 FS $2 FS $5 FS $6 FS $16 FS $18
}