[Qgis-developer] [Python] splitGeometry

Denis Rouzaud denis.rouzaud at gmail.com
Tue Jul 9 04:45:02 PDT 2013


Hi Bernard,

If I remember well, when you do myGeom.splitGeometry, it returns the 
splitted geometry which is removed from myGeom.
So basically, you do have both parts.

Cheers,

Denis

On 07/09/2013 01:15 PM, Bernhard Ströbl wrote:
> 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
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the Qgis-developer mailing list