[Qgis-developer] [Python] splitGeometry

Bernhard Ströbl bernhard.stroebl at jena.de
Tue Jul 9 04:15:33 PDT 2013


Hi,

I am trying to split a geometry (polygon) with a line, the line is 
straight and crossing the polygon's boundary exactly twice; here is my code:

result,  newGeometries,  topoTestPoints = 
myGeometry.splitGeometry(splitterPList, True)

the result is 0 (OK) but newGeometries contains only _one_ polygon. I 
was under the impression that newGeometries would contain _all_ polygons 
resulting from the split operation, i.e. the two halves at each side of 
the line.
If this is the intended behaviour I think I can make a workaround with 
myGeometry.difference(newGeometries[0]), if it is not I will file a ticket.

Bernhard


__________ Information from ESET Mail Security, version of virus signature database 8544 (20130709) __________

The message was checked by ESET Mail Security.
http://www.eset.com




More information about the Qgis-developer mailing list