fme

利用FME创建CAD标准图层模板

笑着哭i 提交于 2020-02-17 17:49:46
在我们FME的博客资料里面,介绍了关于利用FME和Excel表格如何在GIS环境中生成标准数据结构的方法,那下面为大家介绍一下利用FME和Excel表格结合Python脚本如何在AutoCAD环境中生成标准图层的方法。 你拿到的CAD数据生产标准可能是下面这样的,图层太多,线性太多,颜色太多,一个一个建立你会头痛。 你需要确定计算机环境中是否正确安装了FME Desktop软件、AutoCAD软件以及能生成Excel表格的软件。 安装Python模块pyautocad的运行环境,下载pyautocad模块包并安装。在python编译器中运行“import pyautocad”,确保该模块成功安装并可用。 将生产标准规范化到Excel表里面备用 使用FME Desktop读取标准规范化后的 Excel表,利用AttributeCreator将CAD图层名称、线性、颜色等字段内容进行重命名。 设置FME中python脚本的运行环境,在FME Desktop左侧导航栏中工作空间参数下找到“Python Compatibility”,文中涉及的pyautocad模块安装路径在ArcGIS的python路径中,因此,选择 “Esri ArcGIS Desktop(Python 2.7)”( 如果用户你安装在其他路径中

How to call a async function from a synchronized code Python

陌路散爱 提交于 2019-12-07 05:54:00
问题 So I'm locked to a python 3.6.2 interpreter that follows my desktop application. What I want is to call an async function from a synchronized method or function. When calling the python function from the desktop application it has to be a normal function which can not be awaited. From the desktop application I am able to send a list of urls, and what I want is to send back response from every url in an async matter. here is my try I've marked the SyntaxError which I don't know how to bypass.

How to call a async function from a synchronized code Python

巧了我就是萌 提交于 2019-12-05 10:18:40
So I'm locked to a python 3.6.2 interpreter that follows my desktop application. What I want is to call an async function from a synchronized method or function. When calling the python function from the desktop application it has to be a normal function which can not be awaited. From the desktop application I am able to send a list of urls, and what I want is to send back response from every url in an async matter. here is my try I've marked the SyntaxError which I don't know how to bypass. import fmeobjects import asyncio import aiohttp import async_timeout logger = fmeobjects.FMELogFile()