]>
Commit | Line | Data |
---|---|---|
fe559ece RN |
1 | #!/bin/bash |
2 | # | |
3 | # Get location and timezone information from Geonames | |
4 | # | |
5 | # Then simplify & mash it up into the minimal format for our usage. | |
6 | ||
7 | # ~23K entries in 4.5M file (when uncompressed) | |
8 | export CITIES=cities15000.zip | |
9 | if [ ! -e $CITIES ]; then | |
10 | wget http://download.geonames.org/export/dump/$CITIES | |
11 | fi | |
12 | ||
13 | # Simplify the info - just want lat, lon and TZ id | |
14 | unzip -p $CITIES | awk -F "\t" '{print $5, $6, $18}' > latlontz.txt | |
15 | # Result is a ~750K file | |
16 | ||
17 | # Store in the data directory | |
18 | mv latlontz.txt ../data |