# Import system modules import sys, string, os, arcpy # Create the Geoprocessor object # NOTE: DO NOT USE CREATEOBJECT METHOD ary = arcpy.Array() pnt = arcpy.Point() ## create rect starting lower right going clockwise # NOTE: THE x & y PROPERTY ARE IN CAPITALS pnt.X = -117.0 pnt.Y = 35 ary.add(pnt) pnt.X = -117.0 pnt.Y = 35.75 ary.add(pnt) pnt.X = -116.25 pnt.Y = 35.75 ary.add(pnt) pnt.X = -116.25 pnt.Y = 35 ary.add(pnt) ## redo first point (lower right) pnt.X = -117.0 pnt.Y = 35 ary.add(pnt) ## ------------------------------------------------------------- AOI = "C:\\Temp\\test9.shp" ScratchWS = "C:\\Temp" # Process: Create AOI Feature Class... arcpy.CreateFeatureclass_management(ScratchWS, "test9", "POLYGON", "", "DISABLED", "DISABLED", "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];IsHighPrecision", "", "0", "0", "0") cur = arcpy.InsertCursor(AOI) feat = cur.newRow() feat.shape = ary cur.insertRow(feat)
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.