Greetings All
I have a shapefile with 1 polygon in it. I want my script to read the geometry of the polygon and then create multiple polygons in the same file from the original polygon.
I can do this using Describe, ShapeFieldName & a polygon array. But I noticed new python functionality using Shape@WKT and FromWKT
The help section is truly lacking (even by ESRI standards) and I was wondering if anyone can help me join the dots.
It looks like you can use "Shape@WKT" to extract the polygon geometry and put it into a Geometry object, like so:
The writing geometries help section only uses arrays as the input method, but surely I could use FromWkt to create a new geometry object for the InsertCursor?
Am I reading it right? or are arrays the only way to go?
Thanks in advance
I have a shapefile with 1 polygon in it. I want my script to read the geometry of the polygon and then create multiple polygons in the same file from the original polygon.
I can do this using Describe, ShapeFieldName & a polygon array. But I noticed new python functionality using Shape@WKT and FromWKT
The help section is truly lacking (even by ESRI standards) and I was wondering if anyone can help me join the dots.
It looks like you can use "Shape@WKT" to extract the polygon geometry and put it into a Geometry object, like so:
Code:
infc = "D:\\DDP_extent.shp"
infcFields = ["SHAPE@WKT"]
g = arcpy.Geometry()
gList = arcpy.CopyFeatures_management(infc, g)
Am I reading it right? or are arrays the only way to go?
Thanks in advance