Looks like a bug. Will you do me the favor of creating an issue at
https://github.com/Toblerity/Shapely? I'll take a look at it soon.

On Fri, Mar 2, 2012 at 1:20 PM, Redoute <[email protected]> wrote:
> Hi all,
>
> I'm not sure if this is a bug or if it simply can't work:
>
> [Code]
> from shapely.geometry import LineString
> from cPickle import dumps, loads, HIGHEST_PROTOCOL
>
> l = LineString(((0.0, 0.0), (0.0, 1.0), (1.0, 1.0)))
> print l
> print l._ndim # result: 2
>
> s = dumps(l, HIGHEST_PROTOCOL)
> print s
>
> l = loads(s)
> print l
> print l._ndim # result: None
> [/Code]
>
> Which results in strange errors in following computations:
>
>>   File 
>> "C:\Programme\Python27\lib\site-packages\shapely-1.2.14-py2.7-win32.egg\s
>> hapely\coords.py", line 113, in ctypes
>>     array_type = c_double * (m * n)
>> TypeError: unsupported operand type(s) for *: 'long' and 'NoneType'
>
> Redoute
> _______________________________________________
> Community mailing list
> [email protected]
> http://lists.gispython.org/mailman/listinfo/community



-- 
Sean Gillies
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to