Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Edinburgh "EH*" postcode returns London "E*" results #4910

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 5 comments
Closed

Edinburgh "EH*" postcode returns London "E*" results #4910

openstreetmap-trac opened this issue Jul 23, 2021 · 5 comments

Comments

@openstreetmap-trac
Copy link

Reporter: mcld
[Submitted to the original trac issue database at 1.13pm, Sunday, 21st July 2013]

I'm using the search box on the OSM homepage. If I type "eh1 3bq" then I get a lot of London results (eg "E1 4UX") which are E not EH. I don't know why it's doing this - the exact postcode I entered is definitely there in OSM! http://www.openstreetmap.org/browse/node/829318855

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 7.05am, Monday, 22nd July 2013]

Nominatim is doing some name normalization before looking up UK postcodes which the results in a mismatch. It really should be remembering the unnormalized tokens for future reference but that is not trivial to do in the current implementation.

@openstreetmap-trac
Copy link
Author

Author: smsm1
[Added to the original trac issue at 9.56am, Monday, 22nd July 2013]

Is it possibly to include the OS CodePoint Open data for postcodes within the Nominatim search, and return those if there is a match? http://www.ordnancesurvey.co.uk/oswebsite/products/code-point-open/index.html

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 10.04am, Monday, 22nd July 2013]

Nominatim already use external data for UK post codes. It's really just the matching up with that data that goes wrong.

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 7.59pm, Thursday, 24th October 2013]

I've now normalized the postcodes in the external gb_postcodes table on the osm.org instance to alleviate the problem a bit. This is not a full fix but only a temporary hack. The wrong results will still be there but there is a better chance that also some from the right area show up and are ranked higher. Let me know if you see any degradation in search results that previously worked.

Commands used for normalization:

    update gb_postcode set postcode=upper(make_standard_name(postcode));
    select getorcreate_word_id(postcode) from gb_postcode;

Also requires [changeset:b944e8b/nominatim]

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 3.58pm, Saturday, 30th September 2017]

Fixed with postcode handling rewrite.

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

No branches or pull requests

1 participant