[Talk-GB] Postcodes map
Robert (Jamie) Munro
rjmunro at arjam.net
Wed Mar 28 18:40:49 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dave wrote:
> Hi All,
>
> I've made a slippy map showing postcode areas:
> http://beerwarmer.randomjunk.co.uk/osm/postcodes/
> The data comes from the current list at NPE maps ( http://www.npemap.org/ ).
> I've got it overlaying the mapnik layer from OSM at the moment.
>
> It's currently rendered down to level 11, and level 12 in places.
> The black lines are the boundaries of the first letters (eg: SW). The
> blue lines are for the first part of the post code (eg: SW15). And the
> thin green lines are the first number of the second part (eg: SW15 2)
>
> If anyone is interested, it's a python script that generates shapefiles,
> which are then rendered using mapnik and the generate_tiles.py script
> that OSM uses.
> The script works by:
> - feeding in the post code points into a voronoi diagram generator
> - extracting edges from the diagram where post code boundaries meet
> - forming polylines from these edges, and writing them to a shapefile
Excellent work. I wonder if we can extend it to do work with other POIs.
I.e. make a map to show me my nearest pub :-)
> There's a couple of bugs at the moment:
> - post codes on the coast may have missing edges
> - the post code boundaries need clipping to the coastline
> - I think there are some degenerate cases, or incomplete post codes
> which cause things to go a little wrong.
Would that cover this:
http://beerwarmer.randomjunk.co.uk/osm/slippy/moretiles/postcode/11/1016/678.png
There's two black areas called OX inside a bigger OX. Also there is an
OX2 inside a bigger OX2. Perhaps these are caused by trailing spaces in
the NPEMaps database or something - they seem to be common across the
whole thing.
Robert (Jamie) Munro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGCqiez+aYVHdncI0RAvLSAJ0fX4Rld/pXKmW2wIDje94SPXBbFwCgw2gC
fGNyVPUJnPFrPvFrbnUbKyY=
=MCLV
-----END PGP SIGNATURE-----
More information about the Talk-GB
mailing list