摘要:import arcpy import os arcpy.env.workspace = "E:\\BaiduNetdiskDownload\\GeoScene Pro入门课程数据(1)\\data1-10\\data1-10\\第八章\\北京要素.gdb" datasets = arcpy.Lis
阅读全文
摘要:如何求三角形的内心坐标 来自:https://zhidao.baidu.com/question/158982463.html 三角形边长为a,b,c,顶点为A(x1,y1)B(x2,y2)C(x3,y3),并给出证明 内心是角平分线的交点,到三边距离相等. 设:在三角形ABC中,三顶点的坐标为:A
阅读全文
摘要:创建点要素、要素类 #coding=utf-8 import arcpy # 点并非几何类,但通常用于构造几何。PointGeometry是几何。 point=arcpy.Point(10,10) point_Geometry=arcpy.PointGeometry(point) # 调用创建要素类
阅读全文
摘要:文本字号 ArcGIS Pro 使用软件可缩放字体显示文本。这样,用户能够在使标注和注记显示属性保持不变的同时以不同地图比例对这些内容进行绘制。例如,Arial (Open Type) 即属于软件可缩放字体。 显示文本时,文本字符的实际高度因字体而异。类型字符的高度是指其上伸线顶部到下伸线底部的距离
阅读全文
摘要:获得版本 print(arcpy.GetInstallInfo()['Version']) https://github.com/esri/arcgis-pro-sdk-community-samples
阅读全文
摘要:# coding=utf-8 import re import requests def spider(paperurl, picpat): headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKi
阅读全文
摘要:ArcMap python IndentationError: unexpected indent 莫名的错误解决,太烦恼了,搞了好久,搞定 关注我的微信公众号 打开源代码,保存为ansi格式,如图
阅读全文
摘要:def floattostr(x,xsnum): return str(round(x,xsnum)) #xsnum是小数位数,x是小数
阅读全文
摘要:来自:https://www.cnblogs.com/programmer-tlh/p/10461353.html 我的微信公众号 openpyxl模块 Python_Openpyxl 1. 安装 pip install openpyxl 2. 打开文件 ① 创建 from openpyxl imp
阅读全文
摘要:ArcGIS Pro版超级工具基本完成基于ArcGIS Pro2.7,只能用于Pro2.7版本,不能用于ArcMap
阅读全文
摘要:arcpy.management.ApplySymbologyFromLayer("dltb", r"F:\2021年ArcGIS Pro的培训\toolPro\DLFH.lyrx", "VALUE_FIELD DLBM DLBM", "DEFAULT") arcpy.management.Matc
阅读全文
摘要:#!/usr/bin/python # -*- coding: UTF-8 -*- str = "-"; seq = ("a", "b", "c"); # 字符串序列 print str.join( seq );结果 a-b-c
阅读全文
摘要:今天一位群友,Python3也报了类似的错误: TypeError:can't concat str to bytes 原因: 不管是报上面哪种错误?终其根本原因都是:类型不一致所造成的。 一、can't concat bytes to str 解决方法 解决方法也很简单,使用字节码的 decode
阅读全文
摘要:import string def str_count(str): '''找出字符串中的中英文、空格、数字、标点符号个数''' count_en = count_dg = count_sp = count_zh = count_pu = 0 for s in str: # 英文 if s in st
阅读全文
摘要:# -*- coding: utf-8 -*- #by gisoracle 2021.01.23 import arcpy import math #保存数据 def Save(polygon,rows): row = rows.newRow() #row.setValue(shapefieldna
阅读全文
摘要:# -*- coding: utf-8 -*- #by gisoracle 2021.01.23 import arcpy import math #保存数据 def Save(polygon,rows): row = rows.newRow() #row.setValue(shapefieldna
阅读全文
摘要:# -*- coding: utf-8 -*- #by gisoracle 2021.01.23 import arcpy import math #保存数据 def Save(polygon,rows): row = rows.newRow() #row.setValue(shapefieldna
阅读全文