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

Add support of UK post codes in the search #717

Open
biodranik opened this issue Jun 24, 2021 · 10 comments · May be fixed by #8179
Open

Add support of UK post codes in the search #717

biodranik opened this issue Jun 24, 2021 · 10 comments · May be fixed by #8179
Assignees
Labels
Search Search

Comments

@biodranik
Copy link
Member

biodranik commented Jun 24, 2021

In the UK people rely on post codes in everyday life.

@biodranik biodranik added the Search Search label Jun 24, 2021
@rtsisyk rtsisyk added the Enhancement New feature or request, an improvement of some existing feature label Jun 26, 2021
@rtsisyk
Copy link
Contributor

rtsisyk commented Jun 11, 2023

My brief research. There are three distinct scenarios:

1. Individual buildings and nodes

The tag addr:postcode=* should be used in the context of addresses for buildings and nodes. 2

U.K. specific:

Certain organisations such as banks, medical centres & hotels were given unique post codes, presumably due to the high volume of correspondence they'd receive. Even though many of the properties have change businesses over the years (especially banks becoming eateries) they still retain their individual codes. 1

London:

image

Brighton:

image

Germany (just to compare):

image

2. Streets

For streets with the same postcode on both sides of the way this postal_code=* is still valid and widely used. 2

London:

image

Brighton:

image

Germany (just to compare)

image

3. Boundaries

boundary=postal_code is used to specify a dedicated type=boundary area with a consistent national postcode.

London:

I found nothing.

Brighton:

I found nothing.

Germany (just to compare):

image

Belgium (just co compare):

image

Other Data Sources

See 3

Code-Point Open

Locations of every GB postcode centroid.

Useful for geographical analysis, simple route planning and asset management. Data contains postcodes, grid references, NHS® health and regional health authority codes; administrative ward, district, county and country area codes. PDF includes differences between Code-Point and Code-Point Open.

  • Scale: 1 metre resolution for postcode central position
  • Supply format: CSV (comma separated values: a text file)
  • Update cycle: Quarterly, February, May, August and November
  • Coverage: England, Scotland, Wales

https://beta.ordnancesurvey.co.uk/products/code-point-open#technical

"WR13 5DW",10,376933,251977,"E92000001","E19000001","E18000005","E10000034","E07000235","E05015380"
"WR13 5DX",10,378460,250850,"E92000001","E19000001","E18000005","E10000034","E07000235","E05015380"
"WR13 5DY",10,378625,250743,"E92000001","E19000001","E18000005","E10000034","E07000235","E05015380"
"WR13 5DZ",10,378181,250632,"E92000001","E19000001","E18000005","E10000034","E07000235","E05015380"
Attribute Description
Postcode Contains elements for postal area, district, sector, and unit.
Positional quality indicator (PQI) A flag used to indicate the positional accuracy of the coordinates allocated to each postcode record.
Easting Distance in metres east of National Grid origin.
Northing Distance in metres north of National Grid origin.
Country code Code used by the Office for National Statistics (ONS) to identify the country in which the Code-Point Open georeferenced coordinates lies.
NHS regional health authority code English Pan Strategic Health Authority in which Code-Point
Location Coordinate (CPLC) falls.
NHS health authority code English Strategic Health Authority or Scottish Health Board in which CPLC falls.
Administrative county code* County in which CPLC falls.
Administrative district code* Unitary Authority, Metropolitan and Non-Metropolitan District, London Borough, or Scottish Council Area in which CPLC falls.
Administrative ward code* Electoral Ward or Division in which CPLC falls.

There are hot discussions 4 regarding importing vs non-importing Code Point data

For "CodePoint Open" and any other OS OpenData licenced information then the situation is at best unclear. There is no special permission from OS (or other rights holders) for these datasets, and the latest information from OS seems to imply that they regard the OS OpenData License as not compatible with the ODbL.

My take from these endless discussions that Code Point data wasn't imported into OSM and there are no plans to do so.

@biodranik biodranik added this to the Better Search milestone Jun 11, 2023
@biodranik biodranik removed the Enhancement New feature or request, an improvement of some existing feature label Jun 11, 2023
@rtsisyk
Copy link
Contributor

rtsisyk commented Jun 11, 2023

Experimental testing in Organic Maps:

Case (1) - Nodes:

  • ✅ "SE1 4PR", ⭕ "SE14PR"
  • ✅ "SE1 3ST", ⭕ "SE13ST"

=> Parsing of postcodes without space should be improved

Case (2) - Streets:

"SE11 cafe"

image

image

Seems to be working, but I don't have 100% confidence.

Case (3) - Boundaries

image

Seems to be working, but I am not sure that it is because of boundaries.

@rtsisyk
Copy link
Contributor

rtsisyk commented Jun 11, 2023

Code-Point Open has 1,734,274 points. OSM (worldwide) has 807, 198 distinct values in addr:postcode.

@RedAuburn
Copy link
Sponsor Member

RedAuburn commented Jun 11, 2023

There was some sort of postcode centroid import 14 years ago: https://www.openstreetmap.org/changeset/792532, but it only has ~2250 points so imo isn't worth using.

Very happy to see that this is being worked on, thank you :D

@RedAuburn
Copy link
Sponsor Member

I would use Organic Maps if OSM supported entering UK postcodes in the search box. Can’t wait to stop using Google Maps. - vladharbuz

https://news.ycombinator.com/item?id=37351545

@jahed
Copy link

jahed commented Sep 5, 2023

I don't know if it will help with research, but there is a working script which generates post code data for OsmAnd as an OBF file here: https://github.com/hvdwolf/OsmAnd-UKpostcodes

It's using data from https://www.doogal.co.uk/

Can't wait for this issue to be resolved. OrganicMaps seems perfect but without working post codes, I can't recommend it to anyone outside of OSM enthusiasts.

@TS-CUBED
Copy link

TS-CUBED commented Sep 24, 2023

Is there any progress on postcode search for the UK? Would love to move to Organic Maps, but in the UK no postcode search is an immediate no for most.

OSM itself seems to support it nicely, so the data should be there.

@biodranik
Copy link
Member Author

This feature is planned. Please donate, support and stay tuned :)

@3rdRockGuy
Copy link

2024jan29 OrganicSupport email reply has just told me
"We'll implement postal codes search from external sources in this year. Please follow this issue: #717".
Fingers crossed and waiting hopefully....

@Cj-Malone
Copy link

Code-Point Open
Locations of every GB postcode centroid

This dataset covers Great Britain, not GB the country code (UK). It excludes Northern Ireland.

I have some Northern Ireland data here, I've not looked at it in years though.

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

Successfully merging a pull request may close this issue.

8 participants