ARCGIS-Python脚本中相交函数的写法

2025-10-25 00:50:07

1、首先,打开arcgis软件。

ARCGIS-Python脚本中相交函数的写法

2、然后,打开脚本编辑。

ARCGIS-Python脚本中相交函数的写法

3、根据该函数的解释,就应该是:

arcpy.Intersect_analysis(inFeatures, intersectOutput)输入,输出。但其格式不对。

ARCGIS-Python脚本中相交函数的写法

4、再看参考

arcpy.Intersect_analysis(inFeatures, intersectOutput)

参考是这个样子,然后我们根据参考修改代码。

ARCGIS-Python脚本中相交函数的写法

5、还通过Python窗口也试了,但Python窗口使用

arcpy.Intersect_analysis(inFeatures, intersectOutput)

这种语法是对的。

ARCGIS-Python脚本中相交函数的写法

6、最后,以数组的方式去解决问题,单个图层相交时脚本:

arcpy.Intersect_analysis([inFeatures], intersectOutput)

多个图层相交时,或者数组中添加图层,或者这样写:

arcpy.Intersect_analysis("inFeatures;inFeatures1", intersectOutput)

在此,分享给大家,避免大家走了绕路。

ARCGIS-Python脚本中相交函数的写法

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢