open-meteo / geocoding-api

Search locations in any language worlwide
GNU Affero General Public License v3.0
15 stars 7 forks source link

Availability of postal codes for location search #8

Open min7-i opened 1 year ago

min7-i commented 1 year ago

I noticed that adding the additional postal database from geonames is mentioned as a todo item here on the project page, however, below in the installation instructions the download of the postal codes is included. So, I wondered if that feature is available already.

When searching for German cities I often don't find any results when using postal codes, such as 10115 (Berlin) or 60310 (Frankfurt am Main).

Looking at the JSON that is returned from the Geocoding API when searching for Berlin I currently only get two postal codes, but there should be a lot more. grafik

patrick-zippenfenig commented 1 year ago

The "Geonames" data source stores postal codes in two ways:

Currently, only the first data source is being used.

For the second data source, there is no direct connection between postal codes and Geonames IDs. It requires a process to match arbitrary names to Geonames IDs and then integrate them into the system. Simply comparing location names is not sufficient because location names are not unique. Matching administrative classes and coordinates is also necessary.

min7-i commented 1 year ago

I see. Thanks for the quick reply and the explanation.

That sounds like quite a lot of thought and effort has to be put into this. It's a shame that there isn't an easier way to get reliable matches between both sources.