【Arcpy】GetParameter()和GetParameterAsText()的区别

这里先贴一下arcpy帮助里面的描述。

GetParameter():

https://pro.arcgis.com/zh-cn/pro-app/arcpy/functions/getparameter.htm

GetParameterAsText():

https://pro.arcgis.com/zh-cn/pro-app/arcpy/functions/getparameterastext.htm

总结:在写arcpy的时候,获取参数是很常用的。简而言之,GetParameter()获取的是对象,不能直接用print()打印;而GetParameterAsText()获取的是字符串,可以直接打印输出。

posted @ 2020-12-28 18:38  Peninsula  阅读(2643)  评论(0编辑  收藏  举报