你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
yuhenry
赞同来自: 江宝骅 、潘建伟 、zsf 、游_199
with arcpy.da.SearchCursor(lyr, ["SHAPE@"]) as lyrCur: for row in lyrCur: xL, yL = row[0].firstPoint.X, row[0].firstPoint.Y xR, yR = row[0].lastPoint.X, row[0].lastPoint.Y
宋伟凯
赞同来自:
鸡毛掸子
xiaosi9524 - GISER
要回复问题请先登录或注册
4 个回复
yuhenry
赞同来自: 江宝骅 、潘建伟 、zsf 、游_199
宋伟凯
赞同来自:
import arcpy
fc = r"C:\Users\songwk.songwk-PC2.000\Documents\ArcGIS\Default.gdb\GX_DSL_Intersect"
with arcpy.da.UpdateCursor(fc, ["SHAPE@","SX","SY","EX","EY"]) as cursor:
for row in cursor:
#print("QD:X = {0},Y = {1}",row[0].firstPoint.X,row[0].firstPoint.Y)
#print("ZD:X = {0},Y = {1}",row[0].lastPoint.X,row[0].lastPoint.Y)
row.setValue("SX",row[0].firstPoint.Y)
row.setValue("SY",row[0].firstPoint.Y)
row.setValue("EX",row[0].lastPoint.X)
row.setValue("EY",row[0].lastPoint.Y)
cursor.updateRow(row)
del cursor, row
鸡毛掸子
赞同来自:
xiaosi9524 - GISER
赞同来自:
要回复问题请先登录或注册
发起人
相关问题
问题状态