• 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;

    得即高歌失即休,多愁多恨亦悠悠。今朝有酒今朝醉,明日愁来明日愁
  • 相关阅读:
    单例模式
    简单工厂模式
    MSSQL编程笔记三 left join on 和 left join where区别
    冒泡排序、选择排序和插入排序
    Extjs性能问题
    C#委托入门
    metro css for cnblogs
    委托、事件与Observer设计模式
    C# 集合类[转]
    工厂方法模式(Factory Method Pattern)
  • 原文地址:https://www.cnblogs.com/gotoschool/p/3527384.html
Copyright © 2020-2023  润新知