[Talk-GB] Import UK postcode data?

ndrw6 at redhazel.co.uk ndrw6 at redhazel.co.uk
Thu Oct 3 00:40:50 UTC 2019

On 02/10/2019 13:43, Russ Phillips via Talk-GB wrote:
> I'm wondering if it would be feasible and advisable to import the UK 
> postcode data from OS OpenData Codepoint 
> <https://wiki.openstreetmap.org/wiki/Ordnance_Survey_OpenData#Code-Point_Open>. 

I support it. From my own experience, requests like this tend to attract 
objections, so it is important for people who agree with such proposals 
to speak out.

The key and, in my opinion, sufficient reasons for importing postcodes:

- Objectively, postcodes are an important type of addressing and 
geocoding data in the UK. We've had two quarterly projects encouraging 
adding postcodes to the OSM database. Some people (including myself) 
don't like the fact the postcodes are proprietary to Royal Mail but we 
are here to map the world, not to judge it.

- They are accepted in the OSM database and there is no tagging 
ambiguity. Their place is _in_ the OSM database, not in external 
overlays. They are searchable in most applications (OsmAnd, Maps.me), 
the exception is Nominatim, which uses an outdated overlay but this is 
more a workaround for lack of such data in the database, than a solution.

- Code-Point Open is a legal and open source of postcode data. In fact 
it is the _only_ legal source of such data in bulk. All other sources 
are either derived from CPO or are based on local knowledge.

All reasons _against_ the import I've seen so far are based on personal 
preferences. People are objecting because they don't like the idea of 
proprietary address data, do not find them important enough, do not find 
them comprehensive enough. These views are useful in establishing the 
context but are not a reason to block the import of what _is_ available.

Talking about technical aspects:

- The key (and deliberate) limitation Code-Point Open is that it doesn't 
distinguish between residential postcodes and postcodes assigned to 
"large users". This is not ideal but still useful - we know the postcode 
exists at a given location, we just can't be sure if it is the only 
postcode there.

- Quality of building in OSM database. Large buildings, especially in 
town centres, are often not partitioned correctly. Different parts may 
have different street names and postcodes. Code-Point Open may in fact 
be helpful in finding and correcting such issues.

- Some postcodes are for PO boxes (usually collocated with post offices) 
are are best left out.

My recommendation: import missing postcodes "as is" (as points) with 
extra tags denoting the import, import date and an accuracy metric from 
CPO. Keep it searchable and easy to remove or update, if necessary. 
Code-Point Open is updated quarterly and sometimes centroids move to 
another building. Filter out PO boxes and postcodes which are already in 
OSM (I usually check if there is an OSM object with a matching 
addr:postcode within a 10m radius of the code point). Do not attempt to 
merge them with buildings as it is not guaranteed to work in all cases. 
This is best done manually and in some cases it may require a survey.

Best regards,


More information about the Talk-GB mailing list