Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/c/h/chirp-1.2.2/chirp/gui/chirpgui.py   chirp(Download)
            newgeoms = []
            for p in self.selections:
                p2 = wxgeom.path_to_poly(p)
                if p2.intersects(val):
                    p2 = p2.union(val)
        else:
            i, p1 = zip(*polys)
            p2 = geom.merge_polygons([wxgeom.path_to_poly(p) for p in p1])
            self.spec.delete_selection(*i)
            # if polygons are disjoint, may return a multipolygon; split into separate segments
        else:
            i1, p1 = zip(*polys)
            i2, p2 = geom.subtract_polygons([wxgeom.path_to_poly(p) for p in p1])
            self.spec.delete_selection(*i1)
            new_elem = [self.spec.add_geometry(p) for p in geom.polygon_components(p2)]
            self.status.SetStatusText("Select two spectrotemporal segments to split.")
        else:
            p1, p2 = (wxgeom.path_to_poly(p) for i, p in polys)
            if p1.disjoint(p2):
                self.status.SetStatusText("Segments do not intersect.")