利用ST_GEOMETRY 从一个图层更新另一图层空间坐标数据

来源:互联网 发布:重新安装mac os x 编辑:程序博客网 时间:2024/05/29 04:01

FME工具没使用过,研究半天没有结果,放弃,想起以前使用的st_geometry,利用他在数据库内实现更新,应该可以实现,下面测试果然成功;

       利用oracle过程实现从一个表更新另一个表的空间数据,sql如下:

    

  declare     cursor t1 is select * from tableA;  begin    for rec in t1 loop       update tableB t set t.shape=sde.st_geomfromtext(sde.st_astext(rec.shape),22) where t.name=rec.name and t.yhss ='lhd';    end loop;  end;
   执行结果:成功!

   主要用到

st_geomfromtext和sde.st_astext两个st_geometry函数,注意
sde.st_geomfromtext(sde.st_astext(rec.shape),22) 22代表的空间参考需要和源表一致。

原创粉丝点击