From 978c30fd505658c11c9ab87d515189a15b3340ad Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 28 Apr 2015 04:35:23 +0200 Subject: Normalize zusaetze --- makecolumns.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/makecolumns.sh b/makecolumns.sh index 93d2e15..b60cfd6 100755 --- a/makecolumns.sh +++ b/makecolumns.sh @@ -187,10 +187,14 @@ handle_format_version_2() { [ -f 14_unknown ] && mv 14_unknown 14_Email [ -f 15_unknown ] && mv 15_unknown 15_Webadresse - printf "Normalizing flags ..." + printf "Normalizing flags ... " sed -i '' -e s:^1$:00:g -e s:^3$:01:g -e s:^2$:02:g 01_Flags printf "done.\n" + printf "Normalizing zusaetze ... " + lam 04_Namenszusatz 05_Adresszusatz | tr '\t' ' ' | sed -E s/' +'/' '/g > 04_Zusaetze + printf "done.\n" + # If street names come in an extra file, extract # street names first streets=$1/[Dd][Aa][Tt]/[Ss][Tt][Rr][Aa][Ss][Ss][Ee][Nn].[Dd][Aa][Tt] @@ -267,6 +271,10 @@ handle_format_version_3() { sed -E $'s:$:\t:' < 07_08_Strassenindex_Hausnummer | cut -f 2 > 08_Hausnummer printf "done.\n" + printf "Normalizing zusaetze ... " + tr '\t' ' ' < 04_05_Namenszusatz_Addresszusatz | sed -E s/' +'/' '/g > 04_Zusaetze + printf "done.\n" + if [ -f $1/zip-streets-hn-geo.tl ]; then printf "Extracting geo coordinates (precision: house number) ... " extract_version_3 $1/zip-streets-hn-geo.tl -- cgit v1.2.3