<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>GRASS seems to have some kind of Voronoi algorithm, but I find its interface very non-intuitive, so have not found it to try it out. This may be worth pursuing as an alternative route.<br><br>As an aside: I notice that virtually all postcode boundaries are obviously created in this way. For instance the Philips Street Atlas shows totally implausible boundaries along the River Trent in S. Notts. Given that postcode boundaries are ultimately determined by logistically sensible walks for postmen, in this case it's pretty safe to assume that the boundary is actually the river. What this means is that by applying a bit of local knowledge and the existing points it is possible to create better delineating zones in OSM than appear in current mapping. Whether this is a good thing to do, or not, I
 leave for others to decide.<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Kev js1982 <osm@kevswindells.eu><br><b><span style="font-weight: bold;">To:</span></b> OSM - Talk GB <talk-gb@openstreetmap.org><br><b><span style="font-weight: bold;">Sent:</span></b> Mon, 26 April, 2010 12:24:26<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Talk-GB] Postcodes to Shapefile<br></font><br><meta http-equiv="x-dns-prefetch-control" content="off"><div class="gmail_quote">On Mon, Apr 26, 2010 at 12:00 PM, Kev js1982 <span dir="ltr"><<a rel="nofollow" ymailto="mailto:osm@kevswindells.eu" target="_blank" href="mailto:osm@kevswindells.eu">osm@kevswindells.eu</a>></span> wrote:<br><blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am currently trying to create a series of shapefiles from postcodes (using OS Open Geo Data) using the code from "Random Junk" (<a rel="nofollow" target="_blank" href="http://random.dev.openstreetmap.org/postcodes/#">http://random.dev.openstreetmap.org/postcodes/#</a>) running on Ubuntu 9.10 but I can't get it working.<br>

<br><font color="#888888">lots of blah blah about what I did...<br></font></blockquote><div><br>Think i've sussed most of it...<br><br>I zapped my pyshapelib folder and
 downloaded both it and shapelib again<br>
<br>
With the shapelib and pyshapelib tar gzs inside my osm folder I then 
issued the following commands<br>
<br>
tar -xvzf shapelib-1.2.10.tar.gz<br>
mv shapelib-1.2.10 shapelib<br>
tar -xvzf pyshapelib-0.3.tar.gz<br>
mv pyshapelib-0.3 shapelib/pyshapelib/<br>
cd shapelib<br>
make<br>
cd pyshapelib<br>python setup.py build<br>
sudo python setup.py install<br>
cd ../../<br># The next line is really important if you want python to think this folder has python scripts<br>
touch shapelib/__init__.py<br>
cp shapelib/pyshapelib/* shapelib/<br>
<br>
This seamed to get over the original problem<br>
<br>
Then you need to ensure you input file has no trailing lines<br>
<br>
And now to work out why I'm getting<br>
<br>
Traceback (most recent call last):<br>
  File "makeShapeColoured.py", line 349, in <module><br>
    result = voronoi.computeVoronoiDiagram(pts)<br>
  File "/home/kev/osm/voronoi.py", line 746, in computeVoronoiDiagram<br>
    voronoi(siteList,context)<br>
  File "/home/kev/osm/voronoi.py", line 206, in voronoi<br>
    edge = Edge.bisect(bot,newsite)<br>
  File "/home/kev/osm/voronoi.py", line 404, in bisect<br>
    newedge.a = dx/dy<br>
ZeroDivisionError: float division <br></div></div><br>
<meta http-equiv="x-dns-prefetch-control" content="on"></div></div>
</div><br>



      </body></html>