GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Nearest postal code and country  XML
Forum Index -> Postal Codes
Author Message
bognerart



Joined: 28/05/2007 23:18:02
Messages: 15
Offline

For 48.156670 12.829440 I got a postal code from Austria, while the place is in Germany.

It should be possible, that the 1st search is, to which country the position belongs and then the next postal code should be within this country.

In this case the river is the border between Austria and Germany.

http://local.google.com/maps?q=48.15667,12.82944&t=h&ie=UTF8&om=1&ll=48.156667,12.829456&spn=0.01941,0.038452&z=15&iwloc=addr
http://ws.geonames.org/findNearbyPostalCodes?lat=48.156670&lng=12.829440
marc



Joined: 08/12/2005 07:39:47
Messages: 3993
Offline

For lat/lng very close to the border it will always be difficult to determine which country you are looking for. Is it the closest city regardless of the country or is it the closest city within the country?
For the later it is far from trivial to figure out to which country the lat/lng belong. The border polygons are simplified and don't exactly reflect the border line to the meter or even centimeter. Border polygons with higher resolution are rather expensive and there is no way to use them in a free service.

Marc

[WWW]
bognerart



Joined: 28/05/2007 23:18:02
Messages: 15
Offline

I am not sure, if I understand your question.

Please look at the map: http://local.google.com/maps?q=48.15667,12.82944&t=h&ie=UTF8&om=1&ll=48.156467,12.847652&spn=0.155282,0.307617&z=12

The coordinates belong to Germany and are part of the _town_ Burghausen. Geonames counts it to a _small_ Austrian village named Ach, which is across the river.

I understand, that it is very difficult to code.

I have a similar problem with:

47.83889 13.01500

This is a part of the city Salzburg.
http://local.google.com/maps?f=q&hl=de&geocode=&q=47.83889,13.01500&ie=UTF8&ll=47.838913,13.015022&spn=0.03906,0.076904&t=h&z=14&iwloc=addr&om=1
It is a maadow on a smal lake called Salzachsee.

http://ws.geonames.org/findNearbyPostalCodes?lat=47.83889&lng=13.01500 shows Hagenau, which has a zip-code 5101

If you search for 5101
http://www.geonames.org/postalcode-search.html?q=5101&country=AT you get Bergheim as result.

I know the problem with Austrian postal codes and do a search in 2 steps, first a search for the nearest postal code and 2nd I search for the postal code. So at the end I get a wrong result.

Again the problem is probably the river. Rivers are often borders. Maybe this can be used somehow, when calculating a position.
 
Forum Index -> Postal Codes
Go to:   
Powered by JForum 2.1.5 © JForum Team