在Python 工具箱 (.pyt)中,通过创建 Parameter 对象并设置其属性的方式在工具类 getParameterInfo 方法中定义工具参数。 Parameter 对象具有多个读写属性,但应为每个参数设置的属性如下所示: 属性描述 displayName 地理处理窗格中显示的参数名称。 name 在Python 的工具语法中显示的参数名称。 datatype 每个Python 工具...
The example below defines three parameters for a tool: an input parameter that accepts a feature layer, an input parameter that accepts a new field name, and a derived output parameter based on the first input parameter. For the parameters to be reflected in the tool, return the parameter...
parameters):"""Modify the messages created by internal validationforeach tool parameter.This method is called after internal validation"""returndefexecute(self,parameters,messages
所有的地理处理工具都可以在ArcPy中作为函数使用。Python中的函数是一个已定义的功能,用于执行特定的任务;因此,ArcGIS Pro中的每个地理处理工具都是arccpy中的一个功能是有意义的。通过函数调用工具的语法是 arcpy.<toolname_toolboxalias>(<parameters>) 例如,下面的代码运行裁剪工具: import arcpy arcpy.env.workspa...
arcpy.<toolname_toolboxalias>(<parameters>) 例如,下面的代码运行裁剪工具: 代码语言:javascript 复制 importarcpy arcpy.env.workspace="C:/Data"arcpy.Clip_analysis("streams.shp","study.shp","result.shp") 工具也可以通过使用与工具箱别名匹配的模块来使用。访问工具的另一种方法是,首先将工具箱作为模块调...
ArcPy 使您可以访问 ArcGIS Pro 中的所有地理处理工具。打开软件能看到有很多地理处理工具: (1)调用工具的方法两种方法 作为python函数调用: arcpy.<toolname_toolboxalias>(<parameters>) 例如调用裁剪工具: import arcpy arcpy.env.workspace = "C:/Data" arcpy.Clip_analysis("streams.shp", "study.shp", "...
(self,parameters):"""Modify the values and properties of parameters before internalvalidation is performed. This method is called whenever a parameterhas been changed."""returndefupdateMessages(self,parameters):"""Modify the messages created by internal validation for each toolparameter. This method ...
# Name: DeleteGridsAndGraticules.py # Description: Delete grid(s) from a feature dataset. # Author: ESRI # Import system module import arcpy # Enabling logging of the results arcpy.logHistory = True # Set the values of the tool's parameters input_grid_dataset = "C:/Python_Output/grid_...
点击模型构造器有右上角的黑色√,验证模型是否有效,模型有效后,点击√右侧的运行按钮,创建影像金字塔。创建影像金字塔,保存金字塔模型,金字塔模型在目录的toolbox中可以找到。 设计金字塔模型工具 从工具箱重新打开影像金字塔模型,发现没有输入项。 右击影像金字塔模型,选择编辑,再次在模型编辑器中打开影像金字塔模型。
inputInfo.parameters.queryParameters.objectIds string The objectID(s) entered to include in the report templateItemId inputInfo.parameters.templateItemId string The ID of the report template surveyItemId inputInfo.parameters.surveyItemId string The itemID of the survey chosen in Create Re...