On Sep 11, 2009, at 8:00 AM, johnny xia wrote: > Hi, > > I am using shapely.geometry for Pytong to do some polygon operation. > Here is a short description of my problem is: > > I have a Polygon A, B, C. B and C is contained in A. Now I want to > calculate the polygon of (A - (B + C) ). If result Polygon has > holes, I want to convert it to a MultiPolygons. > > Any idea about how to use shapely.geometry to resolve the above > problem. > > -- > Thanks, > Johnny Xia.
Hi Johnny, More or less like this: x = A.difference(B.union(C)) Holes of the resulting polygon (x) can be accessed via the `interiors` attribute: http://gispython.org/shapely/manual.html#id52 Cheers, Sean -- Sean Gillies Programmer Institute for the Study of the Ancient World New York University _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
