GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Missing data at the end of German postal code batch file  XML
Forum Index -> Postal Codes
Author Message
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?
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

[WWW]
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?
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

[WWW]
Karaca


[Avatar]
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
[WWW]
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

[WWW]
 
Forum Index -> Postal Codes
Go to:   
Powered by JForum 2.1.5 © JForum Team