c#讀寫SDO_GEOMETRY字段
阿新 • • 發佈:2018-04-17
() 語句 16.4 lac wkt class ddr cati 條件查詢
查詢語句
select t.SHAPE.SDO_gtype as SDO_gtype, t.shape.sdo_srid as sdo_srid, t.shape.sdo_point.x as point_x, t.shape.sdo_point.y as point_y, t.shape.sdo_point.z as point_z, t.shape.sdo_elem_info as elem_info, t.shape.sdo_ordinates as sdo_ordinates from T_table t
插入字段值
INSERT INTO T_table (ID,SHAPE) VALUES(‘10000000003‘, MDSYS.SDO_GEOMETRY( 2003, NULL, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3,3,22), MDSYS.SDO_ORDINATE_ARRAY(1,1, 5,7) ) );
讀取字段
select t.id as region_id, sdo_util.to_gmlgeometry(t.shape) asregion_location from T_table t
獲取類型
select t.shape.get_gtype() from T_table t select t.SHAPE.SDO_gtype from T_table t
條件查詢
select t.objectid, TO_CHAR(t.shape.get_wkt()) AS wkt, t.comp_type, t.datatype, t.comp_name, t.health_lic, t.shape.SDO_POINT.X asx, t.shape. SDO_POINT.Y as y, t.reg_addr, t.bus_addr from t_publicplaces t where 1 = 1 and substr(t.comp_type, 0, 2) = ‘01‘ and sdo_within_distance(t.SHAPE, SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(116.4, 39.9, NULL), NULL, NULL), ‘distance=1500.0 unit=m‘) = ‘TRUE‘
c#讀寫SDO_GEOMETRY字段