4

I've had a request recently to generate a map which includes UK Postcode districts, ie aggregations of postcodes based on the first section of the code (NW2, B1, E11 etc.).

From what I've read, these aren't available freely (Postcode Shape Files for the UK).

Is there a way of scripting aggregation of boundaries in either QGIS (or possibly R)? I've done this sort of aggregation before using MapBasic but no longer use MapInfo (plus it gave really messy boundaries).

I'm thinking I may use Voronoi regions rather than the actual postcode boundaries as this will be easier in terms of file handling (my postcode shapefiles are split across lots of files so easier just to run Voronoi on the OS Codepoint data set, plus I imagine this will give cleaner, if less accurate, boundaries)

1
  • this API will give you UK postal unit level boundaries(ZE1 0AE) which does voronoi already.., district(NW2) and sector, for example, ZE10 check out www.boundaries-io.com
    – Jeryl Cook
    Aug 19, 2017 at 17:08

2 Answers 2

2

if you are using postgis (SPIT plugin) with qgis, you can use ST_ConcaveHull function for aggregation of boundaries.

i hope it helps you...

1
  • Thanks I'll take a look into this, though wonder if I'll be scuppered by my work firewall! I was just looking at this as well: PyQGIS
    – Tumbledown
    Dec 6, 2012 at 9:59
2

Thanks to Aragon but I found a simpler solution. I ended up using the dissolve function in QGIS. I didn't realise it was possible to do this based on a grouping value. It took a long time to process but got the job done with minimal effort. Definitely a case where learning the correct terminology probably would have gotten me to the answer faster.

As a side note, it turns out the same technique (dissolved Voronoi regions) was used to generate the postcode district maps on Wikipedia. The only downside is that some clean up is needed on the resulting polygons.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.