Redoute
2012-03-02 20:20:16 UTC
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]
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]
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'
Redoutehapely\coords.py", line 113, in ctypes
array_type = c_double * (m * n)
TypeError: unsupported operand type(s) for *: 'long' and 'NoneType'