arcpy
位置D:\Program Files\GeoScene\Pro\Resources\ArcPy\arcpy\__init__.py
”““AddMessage(消息)
创建可以使用任何GetMessages函数访问的地理处理信息消息(Severity=0)。
message(字符串):要添加的消息。”“
arcpy.geoprocessing
D:\Program Files\GeoScene\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py
“”“GP函数AddMessage”“”
create({version})作用创建Geoprocessor对象
arcgisscripting
.pyd文件是用Python编写生成的动态链接库,包含一个或多个Python modules,可以被其它Python代码调用。
python解析.pyd文件_.pyd 文件读取-CSDN博客
参数调整
"""调整传入函数的参数,使其对脚本友好:传入字符串化的结果对象和未包装的圆弧对象"""
isinstance() 函数详细解释:isinstance() 函数来判断一个对象是否是一个已知的类型,类似 type()。
python基础教程:isinstance() 函数_isinstance函数python_梦想拯救世界_的博客-CSDN博客
result类
一个Result对象由地理处理工具返回。
class Result(mixins.ResultMixin,_BaseArcObject):"""A Result object is returned by geoprocessing tools."""status = passthrough_attr('status')resultID = passthrough_attr('resultID')messageCount = passthrough_attr('messageCount')maxSeverity = passthrough_attr('maxSeverity')outputCount = passthrough_attr('outputCount')inputCount = passthrough_attr('inputCount')def getMessage(self, *args):"""Result.getMessage(index)Returns a specific message.返回一个特定的消息。index(Integer):指数(整数):The index position of the message.消息的索引位置。"""from arcpy.geoprocessing._base import gp_fixargsreturn convertArcObjectToPythonObject(self._arc_object.GetMessage(*gp_fixargs(args)))def getMessages(self, *args):"""Result.getMessages({severity})Returns messages.severity{Integer}:The type of messages to be returned: 0=message, 1=warning, 2=error.Not specifying a value returns all message types.* 0: informational message* 1: warning message* 2: error message严重性{整数}:要返回的消息类型:0=消息,1=警告,2=错误。不指定值将返回所有消息类型。* 0:提示消息* 1:警告信息* 2:错误信息"""from arcpy.geoprocessing._base import gp_fixargsreturn convertArcObjectToPythonObject(self._arc_object.GetMessages(*gp_fixargs(args)))def getSeverity(self, *args):"""Result.getSeverity(index)Returns the severity of a specific message.返回特定消息的严重性。index(Integer):The message index position."""from arcpy.geoprocessing._base import gp_fixargsreturn convertArcObjectToPythonObject(self._arc_object.GetSeverity(*gp_fixargs(args)))def getOutput(self, *args):"""Result.getOutput(index)Returns a given output, either as a recordset or a string.以记录集或字符串的形式返回给定的输出。If the output of the tool, such as MakeFeatureLayer is a layer,getOutput will return a Layer object.如果工具的输出,比如MakeFeatureLayer是一个图层,getOutput将返回一个Layer对象。index(Integer):The index position of the outputs."""from arcpy.geoprocessing._base import gp_fixargsreturn convertArcObjectToPythonObject(self._arc_object.GetOutput(*gp_fixargs(args)))def getInput(self, *args):"""Result.getInput(index)Returns a given input, either as a recordset or string.以记录集或字符串的形式返回给定的输入。index(Integer):The index position of the input."""from arcpy.geoprocessing._base import gp_fixargsreturn convertArcObjectToPythonObject(self._arc_object.GetInput(*gp_fixargs(args)))def getMapImageURL(self, *args):"""Result.getMapImageURL({parameter_list}, {height}, {width},{resolution})Gets a map service image for a given output, if one exists.parameter_list{Integer}:Parameter(s) on which the map service image will be based.height{Double}:The height of the image.width{Double}:The width of the image.resolution{Double}:The resolution of the image."""from arcpy.geoprocessing._base import gp_fixargsreturn convertArcObjectToPythonObject(self._arc_object.GetMapImageURL(*gp_fixargs(args)))def cancel(self, *args):"""Result.cancel()Cancels an associated job"""from arcpy.geoprocessing._base import gp_fixargsreturn convertArcObjectToPythonObject(self._arc_object.Cancel(*gp_fixargs(args)))def saveToFile(self, *args):"""Result.saveToFile(rlt_file)Saves the result to a result file (.rlt) .rlt_file(String):Full path to the outputresult file (.rlt) ."""from arcpy.geoprocessing._base import gp_fixargsreturn convertArcObjectToPythonObject(self._arc_object.SaveToFile(*gp_fixargs(args)))def _repr_html_(self, *args):"""Extent.exportToString()Exports the object to its string representation.将对象导出为其字符串表示形式。"""from arcpy.geoprocessing._base import gp_fixargsreturn convertArcObjectToPythonObject(self._arc_object._repr_html_(*gp_fixargs(args)))
convertArcObjectToPythonObject
type(obj)用来查看某个变量(类对象)的具体类型,obj 表示某个变量或者类对象。
type(obj).__name__返回的是类名
type的使用参考Python type()函数:动态创建类
arcobject_to_python_class_mapping包含的内容:
"""从现有的ARC对象创建的对象绕过构造函数。"”“