当前位置: 首页 > news >正文

arcpy.message实现探索

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对象创建的对象绕过构造函数。"”“

http://www.lryc.cn/news/214129.html

相关文章:

  • centos卸载自带的Python3.6.8 安装指定的版本号
  • 《TCP/IP详解 卷一:协议》第5章的IPv4数据报的IHL字段解释
  • 想去银行的背完这些软件测试面试题,你就稳了...
  • 目标检测(Object Detection): 你需要知道的一些概念
  • 〔001〕虚幻 UE5 发送 get、post 请求、读取 json 文件
  • 一条 SQL 是如何在 MyBatis 中执行的
  • 《低代码指南》——维格云机器人常见报错怎么解决?
  • 哈夫曼树c语言版
  • 食堂系统登录报错
  • uniapp原生插件之乐橙摄像机播放插件(子账号云台对讲版)
  • Http代理与socks5代理有何区别?如何选择?(一)
  • system verilog VSCode Windows 配置简述
  • Linux中的Shell编程
  • 图像特征Vol.1:计算机视觉特征度量|第二弹:【统计区域度量】
  • 将图像的锯齿状边缘变得平滑的方法
  • 【MySQL索引与优化篇】数据库设计实操(含ER模型)
  • OpenCV—自动驾驶实时道路车道检测(完整代码)
  • PostGIS轨迹分析——简化轨迹
  • 量化交易-应对市场闪崩
  • 在Vue3+ElementPlus项目中使用具有懒加载的el-tree树形控件
  • 高浓度工业废水处理设备有哪些
  • linux上传mysql数据库
  • easyexcel根据模板导出Excel文件,表格自动填充问题
  • golang调用智能合约,获取合约函数的返回值
  • Django3框架-(3)-[使用websocket]:使用channels实现websocket功能;简化的配置和实际使用方式
  • java-工具类抛异常
  • Navicat连接postgresql数据库 -->华为云服务器
  • Leetcode2086. 从房屋收集雨水需要的最少水桶数
  • Pandas教程(非常详细)(第一部分)
  • typing.Union` 标注一多种变量类型