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 开启编辑会话和编辑操作、在表中创建行、停止编辑操作以及提交编辑会话。的更多相关文章

  1. 针对Oracle数据库表中的数据的常见操作

    1.查询表中所有数据 select * from 表名; 例:select * from stu; 2.查询的同时修改表中数据 select * from 表名  for update; 例:sele ...

  2. ALV界面将可编辑字段值保存到内表中

    具体代码如下: data: lr_grid type ref to cl_gui_alv_grid.      data: l_valid type c.      read table gt_exc ...

  3. 资源工作表中与资源有关的操作(Project)

    <Project2016 企业项目管理实践>张会斌 董方好 编著 这个内容,我需要专门写一篇吗? 不写吧,好像对不起我那股学习的劲:写吧,实在是--一句话就够了:所有与任务有关的新建.修改 ...

  4. 自定义类StyleSheet跨浏览器操作样式表中的规则

    这是群里网友地瓜提供的一个类,不熟悉样式表对象和样式规则对象的浏览器差异的可以看看 /** * Stylesheet.js: utility methods for scripting CSS sty ...

  5. win10 开启蓝 由于其配置信息(注册表中的)不完整或已损坏

    在管理员命令提示符下键入以下命令: Dism /Online /Cleanup-Image /ScanHealth 这条命令将扫描全部系统文件并和官方系统文件对比,扫描计算机中的不一致情况. Dism ...

  6. 控制器中添加DB类才可以操作数据库表中的数据

    必须使用DB:  use DB;

  7. python第一百零五天 ---Django 基础 路由系统 URL 模板语言 ORM 操作

    一 路由系统 URL 1 url(r'^index/',views.index) url(r'^home/', views.Home.as_view()) 2 url(r'^detail-(\d+). ...

  8. 用python库openpyxl操作excel,从源excel表中提取信息复制到目标excel表中

    现代生活中,我们很难不与excel表打交道,excel表有着易学易用的优点,只是当表中数据量很大,我们又需要从其他表册中复制粘贴一些数据(比如身份证号)的时候,我们会越来越倦怠,毕竟我们不是机器,没法 ...

  9. mysql 数据操作 单表查询 目录

    mysql 数据操作 单表查询 mysql 数据操作 单表查询 简单查询 避免重复DISTINCT mysql 数据操作 单表查询 通过四则运算查询 mysql 数据操作 单表查询 concat()函 ...

随机推荐

  1. 【DRF框架】利用序列化组件操作

    使用序列化组件进行操作 不带参数:查+增 带参数:查.改.删 不带参数的操作 # url路由 url(r'^book_list/$',Search_book.as_view()), # views.p ...

  2. Linux中安装配置启动关闭nginx等一系列动作

    Nginx简介 1.Nginx (engine x) 是一个高性能的Web服务器和反向代理服务器,也可以作为邮件代理服务器: 2.Nginx 是由俄罗斯人 Igor Sysoev 采用C语言开发编写的 ...

  3. Luogu P1892 团伙

    Luogu P1892 团伙 这是道很简单的并查集-- 不,它并不简单. 这道题考了一个叫做反集的东西. 也就是说: 如果$a$和$b$是敌人,合并$n+b$和$a$,$n+a$和$b$: 如果$c$ ...

  4. 常见错误 RuntimeError: expected type torch.FloatTensor but got torch.cuda.FloatTensor

    https://www.jianshu.com/p/0be7a375bdbe https://blog.csdn.net/qq_38410428/article/details/82973895 计算 ...

  5. sbt 配置个屁的国内源

    ~/.sbt/repositories [repositories] #本地源 local #兼容 Ivy 路径布局 apache-ivy: https://repo1.maven.apache.or ...

  6. ASP.NET MVC 入门5、View与ViewData

    View建立时有MVC View Page 和 MVC View Content Page两种类型, 前者为标准View, 后者为可继承Master母版页的View. Asp.Net MVC 默认使用 ...

  7. 转: java 双向map

    package tools; import java.util.HashMap; public class DuplexMap<K,V> { class Entry{ K k; V v; ...

  8. ModelAndView返回Json格式的数据

    第一种方式: 1.自定义类JacksonUtil.java,类中实现tojson方法(即将数据转成json类型): 2.自定义类JsonView 继承 AbstractView 3.xml中配置bea ...

  9. 第四章 初始CSS

    一.引入样式 1.行内样式表 <h1 style="color: red;font-size: 18px;">10-30</h1> 2.内部样式表(在hea ...

  10. 从设计稿到实现React应用(分类数据处理)

    1. 确定设计稿和数据 设计稿: 数据: [ {category: "Sporting Goods", price: "$49.99", stocked: tr ...