I have created this array:

array = ([arcpy.Point(-103.85769159, 32.181106371), arcpy.Point(-103.85769159, 32.182755629), arcpy.Point(-103.85575241, 32.182755629), arcpy.Point(-103.85575241, 32.181106371)])

and would like to create a polygon feature from it:

polygon = arcpy.Polygon(array)

My map units are in Decimal Degrees and I'm using NAD27, no projection.

Whenever I try the line to create the polygon, I get an error:

"CreateObject cannot create geometry from inputs"

Why is this happening? It seems so straight forward.

  • 4
    Arcpy will add missing point. Use arcpy.Array( – FelixIP Dec 16 '15 at 18:28

Your set of points does not create a closed line where the first and last point are the same. Polygons are made up of closed lines. Try adding the same point that you start with at the end of your array.

Edit: FelixIP's comment contains the correct answer about using arcpy.Array(). Closing lines used to create polygons is a good practice, but it is not required.

Your Answer

