arcpy spatial adjust更改构成面.线的坐标点
之前写过更改点的坐标点和读取构成线面的坐标
# encoding: utf-8
import arcpy
data=r"d:\JZ\jz\jianzhuclip.shp"
featureList=[]
point = arcpy.Point()
array = arcpy.Array()
feacount=0
with arcpy.da.UpdateCursor(data, ["SHAPE@","FID"]) as cursor2:
for row in cursor2:
feacount+=1
print feacount
#要素
polycount=0
for pts in row[0]:
polycount+=1
print polycount
listpts=[]
#单点
for pt in pts:
if(pt is None):
v=1
else:
point.X=pt.X-305234.1976
point.Y=pt.Y-106438.3427
array.add(point)
array.add(array.getObject(0))
polygon = arcpy.Polygon(array)
array.removeAll()
# Append to the list of Polygon objects
#
featureList.append(polygon)
row[0]=polygon
#row.setValue("SHAPE@", polygon)
cursor2.updateRow(row)
转载自:https://blog.csdn.net/A873054267/article/details/86493845