[gdal-dev] Re: Multipart to singlepart
iomeneandrei
aborruso at tin.it
Thu Dec 9 16:21:29 EST 2010
Caro Paolo,
Paolo Corti wrote:
>
> Ciao Andrea
> this code will do the trick (note that it will create a polygon for
> each ring, so you will get a polygon for each hole as well)
> [...]
>
writing in groups like this is always a surprise and a great pleasure. Thank
you, thank you, thank you.
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
It seems that the object I'm trying to iterate is actually None. This is my
input file:
http://osgeo-org.1803224.n2.nabble.com/file/n5820800/poly.zip poly.zip
As output I obtain only one polygon, and I should have three.
What do you think about?
Writing in groups like this is always a surprise and a great pleasure.
ciao,
a
-----
Andrea Borruso
----------------------------------------------------
email: aborruso at 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-tp5807508p5820800.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev
mailing list