diff options
| author | User Erdgeist <erdgeist@avon.ccc.de> | 2014-02-03 05:56:30 +0000 |
|---|---|---|
| committer | User Erdgeist <erdgeist@avon.ccc.de> | 2014-02-03 05:56:30 +0000 |
| commit | fd538c838dbe37b75d9a63e5b1951c972df6e9ca (patch) | |
| tree | 4b937c78da3af67c7deb2c49361b73a890acb88c | |
| parent | 46f8ba5f4bed3a5c29a7416a10e332bb0ca0b3bc (diff) | |
Extract coordinates and try to map them
| -rw-r--r-- | src/makecolumns.sh | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/makecolumns.sh b/src/makecolumns.sh index 4666f3f..1d19ada 100644 --- a/src/makecolumns.sh +++ b/src/makecolumns.sh | |||
| @@ -167,16 +167,6 @@ handle_new_format() { | |||
| 167 | cat file_* > streets | 167 | cat file_* > streets |
| 168 | rm file_* | 168 | rm file_* |
| 169 | 169 | ||
| 170 | if [ -f $1/zip-streets-hn-geo.tl ]; then | ||
| 171 | ../bin/decompress $1/zip-streets-hn-geo.tl | ||
| 172 | cat file_* | tr '\n\0' '\t\n' > 90_Geokoordinaten_hnr | ||
| 173 | rm file_* | ||
| 174 | elif [ -f $1/zip-streets-geo.tl ]; then | ||
| 175 | ../bin/decompress $1/zip-streets-geo.tl | ||
| 176 | cat file_* | tr '\n\0' '\t\n' > 91_Geokoordinaten_str | ||
| 177 | rm file_* | ||
| 178 | fi | ||
| 179 | |||
| 180 | ../bin/decompress $1/phonebook.db | 170 | ../bin/decompress $1/phonebook.db |
| 181 | 171 | ||
| 182 | numfiles=`find . -name file_\* | wc -l` | 172 | numfiles=`find . -name file_\* | wc -l` |
| @@ -191,6 +181,7 @@ handle_new_format() { | |||
| 191 | fi | 181 | fi |
| 192 | done; | 182 | done; |
| 193 | done | 183 | done |
| 184 | find . -name file_\* -delete | ||
| 194 | 185 | ||
| 195 | mv column_0 01_Flags | 186 | mv column_0 01_Flags |
| 196 | mv column_1 02_Nachname | 187 | mv column_1 02_Nachname |
| @@ -211,8 +202,18 @@ handle_new_format() { | |||
| 211 | else | 202 | else |
| 212 | echo Could not convert streetindexes | 203 | echo Could not convert streetindexes |
| 213 | fi | 204 | fi |
| 205 | sed -E $'s:$:\t:' < 07_08_Strassenindex_Hausnummer | cut -f 2 > 08_Hausnummer | ||
| 214 | 206 | ||
| 215 | find . -name file_\* -delete | 207 | if [ -f $1/zip-streets-hn-geo.tl ]; then |
| 208 | ../bin/decompress $1/zip-streets-hn-geo.tl | ||
| 209 | cat file_* > 90_Geokoordinaten_hnr | ||
| 210 | lam 10_Postleitzahl -s $'\t' 07_Strasse -s $'\t' 08_Hausnummer | ../bin/mapcoords 90_Geokoordinaten_hnr > 16_Koordinaten | ||
| 211 | elif [ -f $1/zip-streets-geo.tl ]; then | ||
| 212 | ../bin/decompress $1/zip-streets-geo.tl | ||
| 213 | cat file_* > 91_Geokoordinaten_str | ||
| 214 | lam 10_Postleitzahl -s $'\t' 07_Strasse | ../bin/mapcoords 91_Geokoordinaten_str > 16_Koordinaten | ||
| 215 | fi | ||
| 216 | rm file_* | ||
| 216 | } | 217 | } |
| 217 | 218 | ||
| 218 | # After function definitions, main() can use them | 219 | # After function definitions, main() can use them |
