Opened 6 years ago

Closed 3 years ago

#5261 closed defect (fixed)

Lookup with postalcode fails

Reported by:… Owned by: geocoding@…
Priority: minor Milestone:
Component: nominatim Version:
Keywords: Cc:



I am using nominatim to lookup some zip codes.

This yields no results.

Removing the city yields valid results.

What is the correct way to combine postalcode and city parameters?

Regards, Paul

Change History (4)

comment:1 Changed 6 years ago by Sarah Hoffmann

It's actually not quite clear what the query means. Are you looking for a city called Zurich with postcode 8005 or for postcode 8005 within Zurich. It may sound similar but it changes how Nominatim looks for the result. Currently it does the first and that doesn't work because there is no such object (with Zurich having more than one postcode and all).

If you are looking for the second then you should leave out the city parameter. Postal codes are assumed to be unique per country. So, this will work:

In any case, postalcode + city should yield some sensible result. Probably by just looking for the postcode with the city.

comment:2 Changed 6 years ago by…

Thanks. I want to look for <zip> <town/city> and get coordinates.

It used to work until a couple of weeks ago with my first query from the ticket.

If you look at your query, you can see that the results are not restricted to the country (CH for Switzerland) and results are coming also from the US, South Africa etc. You need to use countrycodes instead of country.

For now, I'll stick to that then.


comment:3 Changed 6 years ago by Sarah Hoffmann

I noticed the problem with country as well. I've created a separate ticket about that there:

comment:4 Changed 3 years ago by Sarah Hoffmann

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.