Postcode boundary lines

Does anyone know if there’s a way to create boundary lines of postcodes - but not full postcodes?
To explain: If a postcode is M22 4DJ I would take off the last letter and want a map that showed the boundary of everything in M22 4D.

I’ve looked on Doogal but can’t find anything that fits this description. I can get a list of addresses but not an area boundary line. I would really appreciate any advice. Thanks!

1 Like

I don’t think postcodes work like that with the last two letters. While the sector “M22 4” will be a coherent area, and units matching M22 4D* may be located near each other, I don’t think there is a hierarchical arrangement with the last two letters.

3 Likes

Postcodes are not areas with boundaries. They are labels applied to collections of delivery points (e.g. letterboxes). Those delivery points that have a common postcode do not necessarily all fall within one geographic area.

Postcodes do not exist where there is no delivery point. E.g. in the middle of a park, in the middle of a road, in the party wall between houses.

So there is no meaningful boundary.

Examples include E15 2 - the delivery points with E15 2xx postcodes fall into three distinct geographic areas, with other postcodes assigned to delivery points in between them (like E20 1.

If you want to see where the postcodes have been applied, you could try an overpass query along these lines:- overpass turbo

But the main problem you’ll find is that only a small proportion of the M22 postcodes have been added to OSM. You can view the percentages here: - Postcode Stats (M22) | Robert Whittaker's OpenStreetMap Stuff

1 Like

I’ve just imported a few more postcodes in the M22 postcode district, but the counts won’t update until Robert’s stats next refresh.

There is a proposed scheme to generate them from UPRNs.

2 Likes

Thanks for getting back to me everyone. I can see I have a lot to learn about this topic!

From what you’ve said, I may need a different approach.

It doesn’t actually HAVE to be tied to exact postcodes - it’s just that I’m looking for a way to divide a larger area into smaller territories which have a maximum area about the same as, say, a football pitch (but could be smaller).

They will be polygons but I need to avoid overlap. So that would mean that the boundaries often go down the middle of roads, for example.

Apart from drawing them all by hand (and storing as kml files or similar), I’m trying to work out if there’s a nifty way of generating such polygons, hence the idea about postcode boundaries.

I think perhaps I’m being a bit ambitious..?

Would Output Areas from the Office of National Statistics work for you? There’s a postcode relationship for them too.

1 Like

Incidentally there was an interview with someone that was involved in developing the census Output Areas[1] on a recent episode of the Geomob podcast.


  1. including mention of the use of Automated Zoning Procedures in their produciton ↩︎

1 Like

Yes, I was wondering about output areas. The only ones I’ve seen are showing concentrations of ethnic groups, but they don’t often stick to clear boundaries. They cut across part of a block of buildings, for example.

Are there any output areas that don’t do that? Ideally I’d have something where the boundaries were more logical, such as down the middle of a road etc..

I’m assuming that by definition they’re the “output” of a set of data, and so the boundaries wouldn’t be driven so much by convenient physical map features. But I’d be very happy if it was otherwise, or if someone has created such neat areas for survey purposes or the like.

All comments welcome : )

IIRC they were built using postcodes as a base in order to suitably anonymise the statistical data from the census but it has now been a while since I listened to the podcast.

From what I’ve read elsewhere the same street can have multiple postcodes if it’s long enough so a split in the middle of a terrace seems entirely possible.