| Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 18/08/2011 06:13:06
|
lillesand
Joined: 17/08/2011 10:50:29
Messages: 2
Offline
|
Greetings!
There appears to be some missing values near the end of the German postal code batch file.
The correct entries look like expected:
DE 99996 Obermehler Thüringen TH 00 Unstrut-Hainich-Kreis 16064 51.2667 10.6
However, at the end, we find these:
DE 02640 Bautzen 51.1833 14.4333
DE 02643 Bautzen 51.1833 14.4333
DE 04288 Leipzig 51.3667 12.3833
DE 04316 Leipzig 51.3667 12.3833
DE 04328 Sellerhausen-Stünzel
DE 04356 Leipzig 51.3667 12.3833
DE 04824 Beucha 51.3224 12.5633
DE 08318 Hundshübel 50.5333 12.5333
DE 08325 Carlsfeld, Erzgebirge 50.5167 12.6
DE 08344 Grünhain 50.5833 12.8167
DE 08432 Steinpleis 50.7333 12.3833
DE 08439 Langenhessen 50.7333 12.3833
DE 08547 Jößnitz 50.5 12.1333
DE 09028 Chemnitz, Sachsen 50.8333 12.9167
DE 09030 Chemnitz, Sachsen 50.8333 12.9167
DE 09128 Chemnitz, Sachsen 50.8333 12.9167
DE 09224 Mittelbach bei Chemnitz 50.794 12.786
DE 09246 Pleißa 50.8667 12.75
DE 09247 Kändler 50.8667 12.75
DE 09380 Thalheim / Erzgebirge 50.7 12.85
DE 13047 Reinickendorf 52.5667 13.3333
DE 15229 Biegenbrück 52.2674 14.3591
This one in particular is a bit troublesome:
DE 04328 Sellerhausen-Stünzel
Note especially that the one without geocodes lack the correct number of tabs (which cause my line.split("\t") to return too few elements).
Is this something that can be fixed reasonably soon, or should I write a workaround?
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 18/08/2011 06:29:32
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
are you sure the tabs are missing? I would rather suspect your tool is ignoring them (excel?).
Cheers
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 18/08/2011 22:53:03
|
lillesand
Joined: 17/08/2011 10:50:29
Messages: 2
Offline
|
You're absolutely right! The tabs are there, but java ignores trailing delimiter characters when using .split(). Is it generally a good idea to write code that handles missing information for some postal codes, such as the single German postal code missing coordinates?
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 21/08/2011 11:16:44
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
I will add the lat long for Sellerhausen-Stünz. It is always a good idea to code defensively and be prepared for missing input data.
Cheers
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 12/12/2012 06:46:02
|
Karaca
Joined: 09/12/2012 21:53:03
Messages: 9
Location: Frankfurt / Germany
Offline
|
marc wrote:
It is always a good idea to code defensively and be prepared for missing input data.
Not always.
In this case for example, the errors could not be found if lillesand programmed "defensively".
Actually the data should be enriched first if possible. For someone living in Sachsen it is 10 Min. work to add all required fields above.
For cases, fixing is much more complicated i would prefer entering
Code:
Not Available | Unknown | N.A. | ... (e.t.c. ..)
instead of nothing but TABs.
It would signalise that the maintainer is aware of missing data but no solution is available at the moment of DUMP. A search in RDBMS for missing data will be more accurate too.
Karaca
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 02/01/2013 18:19:29
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
Karaca wrote:
Actually the data should be enriched first if possible. For someone living in Sachsen it is 10 Min. work to add all required fields above.
Please feel free to help
|
 |
|
|
 |
|
|