ArcGIS for Desktop中Arcpy获取点要素X,Y坐标报错
代码如下
for row in arcpy.da.SearchCursor(fc, ["SHAPE@XY"]):
# Print x,y coordinates of each point feature
#
x, y = row[0]
print("{}, {}".format(x, y))
RuntimeError: cannot open 'C:/Users/Hello/Desktop/xxxxx/temp2.gdb/testPoint.shp'
但是使用ArcGIS Pro 的python解释器运行结果正常,没有错误
for row in arcpy.da.SearchCursor(fc, ["SHAPE@XY"]):
# Print x,y coordinates of each point feature
#
x, y = row[0]
print("{}, {}".format(x, y))
RuntimeError: cannot open 'C:/Users/Hello/Desktop/xxxxx/temp2.gdb/testPoint.shp'
但是使用ArcGIS Pro 的python解释器运行结果正常,没有错误
1 个回复
潘建伟
赞同来自: 李昫瑄 、陈晨
“.shp”?
要回复问题请先登录或注册