ArcSDE 图层创建、注册、插入数据与删除数据

环境:windows 2003 Server
ArcSDE 9.3


----------------------------ArcSDE注册语法-----------------------


sdelayer -o register -l gis230000000000.st_asj_pt,shape -e p -C objectid,sde -u gis230000000000 -p gis230000000000 -t ST_GEOMETRY -r 0


-l 注册表名与空间列名


-e 注册要素类型
p point
l line
a poylone
        p+ 多点
l+ 多线
a+ 多面
-C 主键列名及管理主键的用户


-u 注册用户名
-p 注册密码
-t 注册类型


删除指定图层,但非删除表
sdelayer -o delete -l aa_1,shape -u test -p test;


查询某个图层的Owner,Layer id,用户可以操作的权限


远端注册
sdelayer -o register -l giswell,shape -e l+ -C ID,USER -t st_geometry -u user -p pwd -i sde:oracle10g:/;local=local_tnsname -r rsid


---------------------------向图层表添加数据-----------------------
select registration_id from sde.table_registry where table_name='ST_KK_PT' and owner='GIS230000000000';--343
insert into st_kk_pt(objectid,
mc, jd, wd, bh, sszzjgdm, fldm, gxsj, shape
)
select 
sde.version_user_ddl.next_row_id('GIS230000000000',343),
mc,
       ltrim(rtrim(jd)) jd,
       ltrim(rtrim(wd)) wd,
       bh,
       sszzjgdm,
       '' fldm,
       sysdate gxsj,
       sde.st_pointfromtext('point('||ltrim(rtrim(jd))||' '||ltrim(rtrim(wd))||')', 4) shape
       --sde.st_pointfromtext('point(125 45)', 4)
       --SDE.St_Linefromtext('linestring(126.47426 35,127.47426 36)', 5)
       --SDE.St_Polygon('polygon((126.47426 35,127.47426 36,128.47426 38,126.47426 35))', 4)
  from JX_KK_PT@JX_PGIS
 where mc NOT LIKE '长青卡口%'
---------------------------清除图层表垃圾数据--------------------
CREATE OR REPLACE PROCEDURE del_sde_tab(tableName IN VARCHAR2) AS
BEGIN
  DELETE FROM sde.gdb_objectclasses t WHERE t.name=UPPER(tableName);
  DELETE FROM sde.geometry_columns t WHERE t.f_table_name=UPPER(tablename);
  DELETE FROM sde.geometry_columns t WHERE t.g_table_name=UPPER(tablename);
  DELETE FROM sde.gdb_usermetadata t WHERE t.name=UPPER(tablename);
  DELETE FROM sde.layers t WHERE t.table_name=UPPER(tablename);
  DELETE FROM sde.st_geometry_index t WHERE t.table_name=UPPER(tablename);
  DELETE FROM sde.table_registry t WHERE t.table_name=UPPER(tablename);
  DELETE FROM sde.column_registry t WHERE t.table_name=UPPER(tablename);
  DELETE FROM sde.gdb_featuredataset t WHERE t.name=UPPER(tablename);
  DELETE FROM sde.all_st_geometry_columns_v t WHERE t.table_name=UPPER(tablename);
  DELETE FROM sde.st_geometry_columns t WHERE t.table_name=UPPER(tablename);
END;


 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值