Hi Sean,
I don't know if Trac sends you an email for new tickets, but I added a
new ticket regarding MultiLineString construction. It's not that big of
an issue, since the workaround is simple, but I thought maybe it might
point to a bug that might cause other problems so I am letting you know.
RHH
The following code passes in Shapely 1.0.4 but the last line fails in
Shapely 1.2a5
import shapely.geometry as g
l = g.LineString([(0,0), (10,0)])
assert l.type == 'LineString'
m = g.MultiLineString([x.coords for x in [l]])
for x in m.geoms:
assert x.type == 'LineString'
m = g.MultiLineString([x.coords for x in m.geoms])
Traceback (most recent call last):
File "error.py", line 7, in <module>
m = g.MultiLineString([x.coords for x in m.geoms])
File
"/usr/lib/python2.6/site-packages/Shapely-1.2a5-py2.6.egg/shapely/geometry/multilinestring.py",
line 80, in __init__
self._geom, self._ndim = geos_multilinestring_from_py(coordinates)
File
"/usr/lib/python2.6/site-packages/Shapely-1.2a5-py2.6.egg/shapely/geometry/multilinestring.py",
line 45, in geos_multilinestring_from_py
geom, ndims = geos_linestring_from_py(ob[l])
File
"/usr/lib/python2.6/site-packages/Shapely-1.2a5-py2.6.egg/shapely/geometry/linestring.py",
line 16, in geos_linestring_from_py
array = ob.__array_interface__
File
"/usr/lib/python2.6/site-packages/Shapely-1.2a5-py2.6.egg/shapely/geometry/base.py",
line 149, in array_interface
'data': self.ctypes,
File
"/usr/lib/python2.6/site-packages/Shapely-1.2a5-py2.6.egg/shapely/geometry/base.py",
line 123, in ctypes
array_type = c_double * (m * n)
TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'
--
Roy Hyunjin Han
http://invisibleroads.com
We train people to become software developers and connect them to jobs
and projects for local businesses
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community