Fix geonames_process.awk
It missed several big towns because of a wrong condition
This commit is contained in:
parent
2fd0096ddd
commit
3bde2d68c0
@ -45,16 +45,16 @@ allCountries.zip:
|
|||||||
fi; \
|
fi; \
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
cities.txt: allCountries.zip
|
allCountries.txt: allCountries.zip
|
||||||
$(AM_V_GEN) if test -x $(UNZIP); then \
|
$(AM_V_GEN) if test -x $(UNZIP); then \
|
||||||
$(UNZIP) allCountries.zip; \
|
$(UNZIP) allCountries.zip; \
|
||||||
else \
|
else \
|
||||||
echo "unzip could not be found in your PATH."; \
|
echo "unzip could not be found in your PATH."; \
|
||||||
echo "It is needed to create geodata.xml!"; \
|
echo "It is needed to create geodata.xml!"; \
|
||||||
fi; \
|
fi; \
|
||||||
if test -f allCountries.txt; then \
|
|
||||||
|
cities.txt: allCountries.txt
|
||||||
$(AWK) -f geonames_process.awk allCountries.txt > $@ ; \
|
$(AWK) -f geonames_process.awk allCountries.txt > $@ ; \
|
||||||
fi
|
|
||||||
|
|
||||||
geodata.xml: countryInfo.txt timeZones.txt cities.txt
|
geodata.xml: countryInfo.txt timeZones.txt cities.txt
|
||||||
$(AM_V_GEN) if test -x "$(PERL)"; then \
|
$(AM_V_GEN) if test -x "$(PERL)"; then \
|
||||||
|
@ -2,6 +2,6 @@ BEGIN {
|
|||||||
FS="\t"
|
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
|
print $9 FS $2 FS $5 FS $6 FS $16 FS $18
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user