SQL如何取得一个面的中心点

select sdo_geom.sdo_centroid(t.shape, 2) .sdo_point.x x,
sdo_geom.sdo_centroid(t.shape, 2) .sdo_point.y y from gd_zy_region t
SQL如何取得一个面的中心点
 
 1 SELECT MAX(SUBSTR(N.COOR, 2, LENGTH(N.COOR))) AS COOR
 2   FROM (select curr, SYS_CONNECT_BY_PATH(coor, ';') AS COOR, prev
 3           from (select rownum as curr,
 4                        m.COLUMN_VALUE as coor,
 5                        rownum - 1 as prev
 6                   from table (select t.SHAPE.sdo_ordinates as c
 7                                 from dmgc_GX t
 8                                where t.OBJECTID = 11) m)
 9          start with curr = 1
10         connect by prev = PRIOR curr) N
取得坐标系的值

 

1 select replace(wm_concat(m.COLUMN_VALUE), ',', ';') as coor from table (select t.SHAPE.sdo_ordinates as c from " + strFileName + " t where t.OBJECTID = " + objectid + ") m
取得坐标系的 值(10g以上)

 

//存储过程 循环遍历将空间坐标转化为属性数据

create or replace procedure insertxy is
cursor var_ids is
select objectid var_objid from DM_ZK;
var_objid varchar2(35);
begin
for vc in var_ids loop
insert into DM_ZK_TEMP
(ZB)
select replace(wm_concat(m.COLUMN_VALUE), ',', ';') as coor
from table (select t.SHAPE.sdo_ordinates as c
from DM_ZK t
where t.OBJECTID = vc.var_objid) m;
end loop;
end insertxy;

posted @ 2014-01-20 18:36  Coderlhx  阅读(1112)  评论(0编辑  收藏  举报