Hi Even,

Even Rouault wrote:
> 
> 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)
> 

now it works perfectly!!

Thank you very much,

Andrea

-----
Andrea Borruso

----------------------------------------------------
email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48" N, 13° 21' 9" E
----------------------------------------------------
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Multipart-to-singlepart-tp5807508p5820973.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to