arcgis python 开启编辑会话和编辑操作、在表中创建行、停止编辑操作以及提交编辑会话。
import arcpy
import os fc = 'Database Connections/Portland.sde/portland.jgp.schools'
workspace = os.path.dirname(fc) # Start an edit session. Must provide the worksapce.
edit = arcpy.da.Editor(workspace) # Start an edit operation
edit.startOperation() # Edit session is started without an undo/redo stack for versioned data
# (for second argument, use False for unversioned data)
edit.startEditing(False, True) # Insert a row into the table.
with arcpy.da.InsertCursor(fc, ('SHAPE@', 'Name')) as icur:
icur.insertRow([(7642471.100, 686465.725), 'New School']) # Stop the edit operation.
edit.stopOperation() # Stop the edit session and save the changes
edit.stopEditing(True)
========================================================帮助写错,本人修改如下
import arcpy
import os fc = 'Database Connections/Portland.sde/portland.jgp.schools'
workspace = os.path.dirname(fc) # Start an edit session. Must provide the worksapce.
edit = arcpy.da.Editor(workspace)
edit.startEditing(False, True) #写在前面,gisoracle
# Start an edit operation
edit.startOperation() # Insert a row into the table.
with arcpy.da.InsertCursor(fc, ('SHAPE@', 'Name')) as icur:
icur.insertRow([(7642471.100, 686465.725), 'New School']) # Stop the edit operation.
edit.stopOperation() # Stop the edit session and save the changes
edit.stopEditing(True)
arcgis python 开启编辑会话和编辑操作、在表中创建行、停止编辑操作以及提交编辑会话。的更多相关文章
- 针对Oracle数据库表中的数据的常见操作
1.查询表中所有数据 select * from 表名; 例:select * from stu; 2.查询的同时修改表中数据 select * from 表名 for update; 例:sele ...
- ALV界面将可编辑字段值保存到内表中
具体代码如下: data: lr_grid type ref to cl_gui_alv_grid. data: l_valid type c. read table gt_exc ...
- 资源工作表中与资源有关的操作(Project)
<Project2016 企业项目管理实践>张会斌 董方好 编著 这个内容,我需要专门写一篇吗? 不写吧,好像对不起我那股学习的劲:写吧,实在是--一句话就够了:所有与任务有关的新建.修改 ...
- 自定义类StyleSheet跨浏览器操作样式表中的规则
这是群里网友地瓜提供的一个类,不熟悉样式表对象和样式规则对象的浏览器差异的可以看看 /** * Stylesheet.js: utility methods for scripting CSS sty ...
- win10 开启蓝 由于其配置信息(注册表中的)不完整或已损坏
在管理员命令提示符下键入以下命令: Dism /Online /Cleanup-Image /ScanHealth 这条命令将扫描全部系统文件并和官方系统文件对比,扫描计算机中的不一致情况. Dism ...
- 控制器中添加DB类才可以操作数据库表中的数据
必须使用DB: use DB;
- python第一百零五天 ---Django 基础 路由系统 URL 模板语言 ORM 操作
一 路由系统 URL 1 url(r'^index/',views.index) url(r'^home/', views.Home.as_view()) 2 url(r'^detail-(\d+). ...
- 用python库openpyxl操作excel,从源excel表中提取信息复制到目标excel表中
现代生活中,我们很难不与excel表打交道,excel表有着易学易用的优点,只是当表中数据量很大,我们又需要从其他表册中复制粘贴一些数据(比如身份证号)的时候,我们会越来越倦怠,毕竟我们不是机器,没法 ...
- mysql 数据操作 单表查询 目录
mysql 数据操作 单表查询 mysql 数据操作 单表查询 简单查询 避免重复DISTINCT mysql 数据操作 单表查询 通过四则运算查询 mysql 数据操作 单表查询 concat()函 ...
随机推荐
- springboot 日志配置
maven依赖中添加了 spring-boot-starter-logging : <dependency> <groupId>org.springframework.boot ...
- Computer Vision_33_SIFT:An Improved RANSAC based on the Scale Variation Homogeneity——2016
此部分是计算机视觉部分,主要侧重在底层特征提取,视频分析,跟踪,目标检测和识别方面等方面.对于自己不太熟悉的领域比如摄像机标定和立体视觉,仅仅列出上google上引用次数比较多的文献.有一些刚刚出版的 ...
- Winserver-Exception from HRESULT: 0x800A03EC
Q: 程序在VS中手动执行没问题,但是排了JOB报异常:Exception from HRESULT: 0x800A03EC at Excel.WorkbookClass.SaveAs() A: ...
- Android笔记(二十) Activity中的跳转和值传递
我们知道,一个APP是由若干个Activity组成的,那么各个Acitivity中肯定需要进行跳转以及传递数值以保证App的运行,现总结一下多个Activity之间的跳转和值传递. 显式Intent跳 ...
- linux防火墙扩展模块实战(二)
iptables扩展模块 扩展匹配条件:需要加载扩展模块(/usr/lib64/xtables/*.so),方可生效 查看帮助 man iptables-extensions (1)隐式扩展 ...
- 用Jmeter做性能测试,之后报表展示
https://octoperf.com/blog/2017/10/19/how-to-analyze-jmeter-results/ 看到性能测试平台的开发,我在想需要什么功能,报表需要什么样子的 ...
- 开源框架---tensorflow c++ API 运行第一个“手写字的例子”
#CMakeLists.txt cmake_minimum_required (VERSION ) project (tf_example) set(CMAKE_CXX_FLAGS "${C ...
- 2018 ACMICPC上海大都会赛重现赛 H - A Simple Problem with Integers (线段树,循环节)
2018 ACM 国际大学生程序设计竞赛上海大都会赛重现赛 H - A Simple Problem with Integers (线段树,循环节) 链接:https://ac.nowcoder.co ...
- How to parse unix timestamp to time.Time
The time.Parse function does not do Unix timestamps. Instead you can use strconv.ParseInt to parse ...
- MySQL 表查询
表查询 前期准备一张表 create table emp( id int not null unique auto_increment, name varchar(32) not null, gend ...