标签:lis shape div arcpy style point loading cgi port
# -*- coding: utf-8 -*- #by gisoracle 2021.01.23 import arcpy import math #保存数据 def Save(polygon,rows): row = rows.newRow() #row.setValue(shapefieldname,featureList) row.shape=polygon rows.insertRow(row) del row x=500000 y=0 r=200.0 pi=3.1415926 outFeature=arcpy.GetParameterAsText(0) array = arcpy.Array() #point = arcpy.Point() for i in range(0,180): x1=x+r*math.cos(i*pi/180) Z=r*math.sin(i*pi/180) point = arcpy.Point(x1,y,Z) #point.X=x1 #point.Y=y #point.Z=Z arcpy.AddMessage("Z="+str(Z)) array.add(point) y=300 for i in range(180,0,-1): x1=x+r*math.cos(i*pi/180) Z=r*math.sin(i*pi/180) point = arcpy.Point(x1,y,Z) #point.X=x1 #point.Y=y #point.Z=Z array.add(point) arcpy.AddMessage("Z=" + str(Z)) rows = arcpy.InsertCursor(outFeature) polygon = arcpy.Polygon(array,None,True) Save(polygon, rows) polygon = None
标签:lis shape div arcpy style point loading cgi port
原文地址:https://www.cnblogs.com/gisoracle/p/14324583.html