<div class="gmail_quote">On Mon, Apr 26, 2010 at 12:00 PM, Kev js1982 <span dir="ltr"><<a href="mailto:osm@kevswindells.eu">osm@kevswindells.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); 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 href="http://random.dev.openstreetmap.org/postcodes/#" target="_blank">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>