Fix geonames_process.awk
It missed several big towns because of a wrong condition
This commit is contained in:
		| @@ -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 \ | ||||
| 	    $(AWK) -f geonames_process.awk allCountries.txt > $@ ; \ | ||||
| 	fi | ||||
|  | ||||
| cities.txt: allCountries.txt | ||||
| 	$(AWK) -f geonames_process.awk allCountries.txt > $@ ; \ | ||||
|  | ||||
| geodata.xml: countryInfo.txt timeZones.txt cities.txt | ||||
| 	$(AM_V_GEN) if test -x "$(PERL)"; then \ | ||||
|   | ||||
| @@ -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 | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user