summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUser Erdgeist <erdgeist@avon.ccc.de>2014-02-13 22:11:25 +0000
committerUser Erdgeist <erdgeist@avon.ccc.de>2014-02-13 22:11:25 +0000
commitf5a181640e97d02bf801d661ac31f3f40bd05200 (patch)
treea1849a6b46b547b5bc3e189453a30b2f4d45cc2e
parent7d73c25e8991f106fa4cf94f655c86b1b005acda (diff)
Make working on geo-coordinate-dump dependent on the coordinate file being there
-rwxr-xr-xsrc/makecolumns.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/makecolumns.sh b/src/makecolumns.sh
index 5b76c91..e270e18 100755
--- a/src/makecolumns.sh
+++ b/src/makecolumns.sh
@@ -174,16 +174,17 @@ handle_old_format() {
174 else 174 else
175 mv 07_unknown 07_Strasse 175 mv 07_unknown 07_Strasse
176 fi 176 fi
177 rm ??_unknown
178 177
179 karto=$1/[Dd][Aa][Tt]/[Kk][Aa][Rr][Tt][Oo].[Dd][Aa][Tt] 178 karto=$1/[Dd][Aa][Tt]/[Kk][Aa][Rr][Tt][Oo].[Dd][Aa][Tt]
180 [ -f ${karto} ] && do_processfile_old ${karto} "geo coordinates" 90_Geokoordinaten_hnr_raw 179 if [ -f ${karto} ]; then
180 do_processfile_old ${karto} "geo coordinates" 90_Geokoordinaten_hnr_raw
181 181
182 printf "Looking up geo coordinates for each phonebook entry ... " 182 printf "Looking up geo coordinates for each phonebook entry ... "
183 tr '\0' '\n' < 90_Geokoordinaten_hnr_raw | tr ';' '\t' | cut -f "1,2,3,4,6,7" | tr '\n' '\0' > 90_Geokoordinaten_hnr 183 tr '\0' '\n' < 90_Geokoordinaten_hnr_raw | tr ';' '\t' | cut -f "1,2,3,4,6,7" | tr '\n' '\0' > 90_Geokoordinaten_hnr
184 rm 90_Geokoordinaten_hnr_raw 184 rm 90_Geokoordinaten_hnr_raw
185 lam 10_Postleitzahl -s $'\t' 11_Ort -s $'\t' 07_Strasse -s $'\t' 08_Hausnummer | mapcoords 90_Geokoordinaten_hnr | convertcoords > 16_Koordinaten 185 lam 10_Postleitzahl -s $'\t' 11_Ort -s $'\t' 07_Strasse -s $'\t' 08_Hausnummer | mapcoords 90_Geokoordinaten_hnr | convertcoords > 16_Koordinaten
186 printf "done.\n" 186 printf "done.\n"
187 fi
187} 188}
188 189
189handle_new_format() { 190handle_new_format() {