On Mon, Apr 26, 2010 at 1:24 PM, Kev js1982 <o...@kevswindells.eu> wrote:
> On Mon, Apr 26, 2010 at 12:00 PM, Kev js1982 <o...@kevswindells.eu> wrote:
>>
>> I am currently trying to create a series of shapefiles from postcodes
>> (using OS Open Geo Data) using the code from "Random Junk"
>> (http://random.dev.openstreetmap.org/postcodes/#) running on Ubuntu 9.10 but
>> I can't get it working.
>>
>> lots of blah blah about what I did...
>
> And now to work out why I'm getting
>
> Traceback (most recent call last):
>   File "makeShapeColoured.py", line 349, in <module>
>     result = voronoi.computeVoronoiDiagram(pts)
>   File "/home/kev/osm/voronoi.py", line 746, in computeVoronoiDiagram
>     voronoi(siteList,context)
>   File "/home/kev/osm/voronoi.py", line 206, in voronoi
>     edge = Edge.bisect(bot,newsite)
>   File "/home/kev/osm/voronoi.py", line 404, in bisect
>     newedge.a = dx/dy
> ZeroDivisionError: float division
>


These are caused by more than one postcode for the same point --
you'll need to preprocess the input files to remove any duplicates
coordinates. There's quite a lot of apparent PO boxes and other odd
postcodes in the OS data which result in duplicate points.

Also note that it'll use about 6GBs of RAM to run for the complete OS
dataset of 1.6 million points.

Dave

_______________________________________________
Talk-GB mailing list
Talk-GB@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-gb

Reply via email to