[Tilesathome] Illegal division by zero
Martijn van Oosterhout
kleptog at gmail.com
Fri Jun 6 08:55:02 BST 2008
2008/6/6 Dirk-Lüder Kreie <osm-list at deelkar.net>:
>> It would be helpful if someone could determine which routine in
>> lines2curves is causing the problem. However, looking at the code in
>> lines2curves it appears the problem could be caused by a way
>> containing two successive nodes at the same location (either the same
>> node or a different one). Does this sound plausible?
>
> Yes that would be a very plausible cause for this behaviour.
>
> Next question: how do we avoid this?
Not sure, somewhere in the loop you would need to do a test like:
if( $vec->length == 0 ) # or < epsilon
{ next }
so it just skips that node, since by definition it's not relevent.
Have a nice day,
--
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/
More information about the Tilesathome
mailing list