pntGeom = arcpy.PointGeometry(arcpy.Point(2000, 2000)) #substitute your centroid x/y coordinates circleGeom = pntGeom.buffer(100) #substitute the distance from your circles verticies to the centroid arcpy.CopyFeatures_management(circleGeom, r"C:\temp\test.gdb\test) # copying to a GDB will preserve the "true curve" geometry arcpy.CopyFeatures_management(circleGeom, r"C:\temp\test.shp) # copying to a .shp will force densification
import math, arcpy def circle_poly(x,y,r): for i in range(100): ang = float(i)/100 * math.pi * 2 yield (x + r * math.cos(ang), y + r * math.sin(ang) ) pointArray = arcpy.Array() for (x,y) in circle_poly(-121.4543,43.972,100): pointArray.add(arcpy.Point(x,y)) circlePolygon = arcpy.Polygon(pointArray, arcpy.SpatialReference(4326)) outFC = arcpy.CreateFeatureclass_management("in_memory","circle","POLYGON") arcpy.DefineProjection_management(outFC, arcpy.SpatialReference(4326)) cursor = arcpy.da.InsertCursor(outFC, ["SHAPE@"]) cursor.insertRow([circlePolygon]) del cursor del circlePolygon del pointArray
is it possible to read that kind of information from a 'true curve' circle using a search cursor
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.