> > I have modified a little your code - https://gist.github.com/735330 - and I > have this message: > Polygon added. > Traceback (most recent call last): > File "PaoloIsGreat.py ", line 32, in <module> multipoly2poly(in_lyr, > out_lyr) > File "PaoloIsGreat.py ", line 8, in multipoly2poly for geom_part in geom: > TypeError: 'Geometry' object is not iterable
Geometry have been made iterable only since GDAL 1.7.0. You need to upgrade your GDAL version or modify a bit the script to make the iteration with the OGR API. instead of : for geom_part in geom: addPolygon(geom_part.ExportToWkb(), out_lyr) try : for i in range(geom.GetGeometryCount()): geom_part = geom.GetGeometryRef(i) addPolygon(geom_part.ExportToWkb(), out_lyr) _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev