On Mon, Oct 29, 2012 at 3:58 PM, Dominik Fröhlich <[email protected]> wrote: > Hi again! > > Maybe you could also help me with an other issue: I need to save the > coordinates of the polygon vertices to a list for later processing. I tried > with "thepoints = thepoly.asMultiPoint()" but get an empty list. > In the API Documentation I found that the function asMultPoint() needs a > MultiPoint-geometry as input (what makes no sense to me, as I don't need to > convert it if it is already MultiPoint…?). > > Is there an other function that does what I want, or am I calling the > asMultiPoint function wrong?
Dominik, if you have a polygon, then you need to use asPolygon() method. It will give you list of rings (and each ring is a list of vertices). The list of rings always has at least one ring (the outer one) - if there are more rings then your polygon has some holes. The function asMultiPoint() works only for geometry type MultiPoint (which is something completely different, see [1]). [1] http://upload.wikimedia.org/wikipedia/commons/4/4e/Geometrietypen.jpg Martin _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
