NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

0
1

Hello,

I got a tool that detects longitude and latitude of specific cities with postal code + city name in the query. I took the first place that is returned automatically, because there are many requests I had to do one time for our database.

Unfortunately, when I search for München in Germany, the first result is not the correct city, even when I request it with the right postal code and the first result got another postal code:

http://nominatim.openstreetmap.org/search?q=81660+M%C3%BCnchen+DE&format=xml&addressdetails=1

Can anybody provide me any solution?

asked 19 Sep '13, 14:19

modiX's gravatar image

modiX
16113
accept rate: 0%


If you know that you are looking for a postcode + city, it is better to use structured requests (see search parameters in the Nominatim docs for details). So your example should be:

http://nominatim.openstreetmap.org/search?postalcode=81660&city=M%C3%BCnchen&country=de&format=xml&addressdetails=1

Although this specific postcode seems to be missing in OSM, so the query does not give any results at all. A word of warning at this point: support for postcodes in Nominatim is very rudimentary still, so results should always be taken with a grain of salt.

permanent link

answered 19 Sep '13, 15:07

lonvia's gravatar image

lonvia
6.2k25789
accept rate: 40%

I wished this would solve my problem :/

(20 Sep '13, 11:46) modiX
3

hey modiX,

Please check your postalcode: 81660 is NOT a geographical postalcode in Germany. It is more a Postalcode for big institutions like companies, banks or authorities inside Germany, a so called "Großkunden-Postleitzahl" in German.

Thus you can address an institution without mentioneing a street name.

These special postalcodes should NOT be stored in OSM. So you will not find it there. Please retry with a postalcode that covers a kind of area like a suburb of Munich or similar.

(22 Sep '13, 10:32) stephan75

You are right, thanks. the real postal code 81671 results the correct München in Bayern at both cases (full query and OSM). So my only work-around would be to replace the industry postal code with the geographic postal code. Unfortunately I cannot find any list in the web, but this is another problem case. Thanks so much! :)

(23 Sep '13, 07:45) modiX

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×689

question asked: 19 Sep '13, 14:19

question was seen: 4,807 times

last updated: 23 Sep '13, 07:45

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum