摘要:Geometry 描述 来自:https://pro.arcgis.com/zh-cn/pro-app/arcpy/classes/geometry.htm 几何对象定义空间位置和关联几何形状。 描述 来自:https://pro.arcgis.com/zh-cn/pro-app/arcpy/cla
阅读全文
摘要:使用SearchCursor排序字段必须在输出字段,否则不能排序
阅读全文
摘要:os._exit(0),退出ArcMap pass:不做任何事情,只起到占位的作用 3、exit():结束整个程序 >`
阅读全文
摘要:python 字符串只替换一次函数,支持汉字
阅读全文
摘要:The field object represents a column in a table. A field has many properties, the most obvious ones being its name and its type. 讨论 Field properties can be accessed through the ListFields and Descr...
阅读全文
摘要:import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] lyr = arcpy.mapping.ListLayers(mxd, "Cities", df)[0] # Use the SelectLayerByAttribute too...
阅读全文
摘要:arcgis python 判断是数据库或是文件夹
阅读全文
摘要:# -*- coding: cp936 -*- ############################################################# import arcpy import os from arcpy import env import math env.overwriteOutput = True shp_sheet = arcpy.Get...
阅读全文
摘要:ArcGIS Pro学习加微信公众号 我的微信公众号 import os def file_name(file_dir): for root, dirs, files in os.walk(file_dir): print('root_dir:', root) # 当前目录路径 print('sub
阅读全文
摘要:import sysprint(sys.path)
阅读全文
摘要:之前写过一篇如何在windows操作系统上给.py文件添加一个快速处理的右键功能的文章:《一键将Python2代码自动转化为Python3》,作用就是为了将Python2的文件升级转换成Python3的文件。 之后,有朋友问,如果有很多文件需要转换,一个个的右键转换还是觉得麻烦!这个问题我非常喜欢,
阅读全文
摘要:来自:https://pro.arcgis.com/zh-cn/pro-app/tool-reference/appendices/using-the-in-memory-output-workspace.htm 使用 in_memory 工作空间的注意事项 ArcGIS 应用程序、ArcGIS P
阅读全文
摘要:import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") mxdfile=arcpy.GetParameterAsText(0) dpi=arcpy.GetParameterAsText(1) arcpy.mapping.ExportToJPEG(mxd, mxdfile ,resolution=dpi) del mxd
阅读全文
摘要:import arcpy ##################my = arcpy.GetParameterAsText(0)mylyrfile = arcpy.GetParameterAsText(1)if my== '#': my = "F:\\闫磊\\data\\Chinadata\\shp\
阅读全文
摘要:来自:http://c.biancheng.net/view/2257.html 很多编程语言都允许定义个数可变的参数,这样可以在调用函数时传入任意多个参数。Python 当然也不例外,Python 允许在形参前面添加一个星号(*),这样就意味着该参数可接收多个参数值,多个参数值被当成元组传入。下面
阅读全文
摘要:改进代码 输出坐标如下 消息执行: 获得坐标 fw_1开始时间: Mon May 13 08:31:04 2019正在运行脚本 获得坐标...Feature 660:Part 0:i=0,X=57219.7552977, Y=86478.4272009i=1,X=57797.135264, Y=86
阅读全文
摘要:代码:10.0不能运行 2.2.0 9.2 2.3.0 9.3、9.3.1 3.0.0 10.0、10.1、10.2、10.2.1、10.2.2、10.3、10.3.1、10.4、10.4.1、10.5、10.5.1 ArcGIS Pro 1.0、1.1、1.2、1.3、1.4
阅读全文
摘要:arcgis python获得字段唯一值 # Import native arcgisscripting moduleimport arcgisscripting, sys# Create the geoprocessor objectgp = arcgisscripting.create(9.3)
阅读全文
摘要:desc = arcpy.Describe(r"C:\Users\dell\Documents\ArcGIS\ddd.shp") 是ShapeFile desc = arcpy.Describe(r"r"C:\Users\dell\Documents\ArcGIS\default.gdb\ds\dl
阅读全文