I am trying to use the geometry method to calculate the convex hull around two polygons (
polyB) with the following code:
# Union both polygons to one (multipart) polygon: polyAB = polyA.union(polyB) # Calculating the convex hull around polyAB: convexhullAB = polyAB.convexHull()
To check if it is working I am writing the combined polygon (
polyAB) and the convex hull (
convexhullAB) to a shapefile:
cur_poly = arcpy.da.InsertCursor("polyAB.shp", ["SHAPE@"]) cur_poly.insertRow((polyAB,)) cur_convex = arcpy.da.InsertCursor("convex.shp", ["SHAPE@"]) cur_convex.insertRow((convexhullAB,))
polyAB.shp contains the (correct) polygon, but
convex.shp is empty.
Has anyone an idea what went wrong?