Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of hierarchical postcodes #1011

Open
lonvia opened this issue Apr 10, 2018 · 1 comment
Open

Handling of hierarchical postcodes #1011

lonvia opened this issue Apr 10, 2018 · 1 comment

Comments

@lonvia
Copy link
Member

lonvia commented Apr 10, 2018

Some countries like the UK or the Netherlands have hierarchical postcodes where a part of the postcode can be left out to designate a larger area. In OSM both the long and short form may be mapped. And a user may search for either of them.

Nominatim should be able to match hierarchical postcodes against any longer and shorter form. A couple of thoughts what needs to be done for this:

  • Parsing of country-specific postcode formats is required for import and search.
  • On import/update, short form centroids need to be derived from longer forms for the postcode table. They should be marked, so that they are not used for the calculated postcode in places.
  • On search, postcodes need to be looked up from longest to shortest form.
@dracos
Copy link

dracos commented Jun 18, 2018

I would really like this because e.g. a search for https://nominatim.openstreetmap.org/search.php?q=Main+Road%2C+Bromley returns two roads, one in TN16, one in BR5 (15 results for the first, then 4 for the second), but https://nominatim.openstreetmap.org/search.php?q=Main+Road%2C+Bromley%2C+BR5 returns no results, and https://nominatim.openstreetmap.org/search.php?q=Main+Road%2C+BR5 returns results in Birmingham (a bus stop called BR5, no Main Road, though) or Fiji.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants