Hi,
Thanks a lot for the quick reply. I've tried the
samples and modified the code for world.py to use a
different polygon shapefile. It seems that when the
code encounters the line 93
for f in store.iterfeatures():
throws a exception in data.py at line 216
# The geometry
# ------------
gref = fi.GetGeometryRef()
gtype = gref.GetGeometryType()
if gtype == ogr.wkbPoint:
geom = spatial.Point(wkb=gref.ExportToWkb())
elif gtype == ogr.wkbLineString:
geom =
spatial.LineString(wkb=gref.ExportToWkb())
elif gtype == ogr.wkbPolygon:
geom =
spatial.Polygon(wkb=gref.ExportToWkb())
else:
raise Exception, \
"Geometry can not be converted to a PCL
class"
I've cheched the shapefile an found that some polygon
shapes are multipart. I've exploded the polygons and
everything worked just fine.
Thought you might be intrested.
Cheers,
Lucian
Logged In: YES
user_id=652759
Thanks for the report. I'll schedule this for the 0.8.1
release.