Currently building a tool that automates the creation of some polygons that we need done quarterly. Below is just a set script I am using that is giving me a similar issue when I try to run the script. The current output only gives me a polygon with 4 vertices and it is not making a point for each coordinate I have listed. This full script is much larger and complex this is just the one part I am stuck on for some reason. This sample is one of my variations I have tried.
Code
import arcpy
workspace = r"....\Workspace\WritingGeometries"
coordinateSystem = 4326
arcpy.env.workspace = workspace
arcpy.env.overwriteOutput = True
arcpy.env.outputCoordinateSystem = coordinateSystem
fcPointTest = "TestPolygon"
fcPointPath = dsPath + "\\" + fcPointTest
arcpy.CreateFeatureclass_management(dsPath, fcPointTest, "POLYGON")
testCord3 = [arcpy.Point(-95.542806, 30.720361),
arcpy.Point(-95.479499, 30.805696),
arcpy.Point(-95.499301, 30.814402),
arcpy.Point(-95.509831, 30.817513),
arcpy.Point(-95.516297, 30.818963),
arcpy.Point(-95.520657, 30.819754),
arcpy.Point(-95.523791, 30.820232),
arcpy.Point(-95.526151, 30.820543),
arcpy.Point(-95.527991, 30.820756),
arcpy.Point(-95.529465, 30.820909),
arcpy.Point(-95.530674, 30.821021),
arcpy.Point(-95.531681, 30.821107),
arcpy.Point(-95.532535, 30.821174),
arcpy.Point(-95.533267, 30.821227),
arcpy.Point(-95.533901, 30.821270),
arcpy.Point(-95.534457, 30.821305),
arcpy.Point(-95.542806, 30.821560),
arcpy.Point(-95.534457, 30.821305),
arcpy.Point(-95.533901, 30.821270),
arcpy.Point(-95.533267, 30.821227),
arcpy.Point(-95.532535, 30.821174),
arcpy.Point(-95.531681, 30.821107),
arcpy.Point(-95.530674, 30.821021),
arcpy.Point(-95.529465, 30.820909),
arcpy.Point(-95.527991, 30.820756),
arcpy.Point(-95.526151, 30.820543),
arcpy.Point(-95.523791, 30.820232),
arcpy.Point(-95.520657, 30.819754),
arcpy.Point(-95.516297, 30.818963),
arcpy.Point(-95.509831, 30.817513),
arcpy.Point(-95.499301, 30.814402),
arcpy.Point(-95.606112, 30.805696)]
#Begin Processing
array = arcpy.Array(testCord3)
polygon = arcpy.Polygon(array)
cursor = arcpy.da.InsertCursor(fcPointPath, ["SHAPE@"])
cursor.insertRow([polygon])
del cursor
Below is a screenshot of what my output is.
Solution
Once Paul helped me out and noticed an error in my coordinates I was able to get the script to run through with 0 issues.