我正在使用Oracle Database 11.2
. sdo_elem_info_array
我已经使用和sdo_ordinate_array
变量加载了一个带有多面体的几何列。但是当我尝试检索形状的文本版本时,我只得到MULTIPOLYGON ()
.
这个块说明了我的问题:
DECLARE
v_elem_info_array sdo_elem_info_array;
v_ordinate_array sdo_ordinate_array;
v_boundary sdo_geometry;
BEGIN
-- This works:
dbms_output.put_line(SDO_UTIL.TO_WKTGEOMETRY( SDO_UTIL.FROM_WKTGEOMETRY('MULTIPOLYGON(((-109.2693 45.00528,-104.0577 44.99743,-104.05325 41.0014,-111.04673 40.99795,-111.0552 45.00132,-109.2693 45.00528)))')));
-- This does not work:
v_elem_info_array := sdo_elem_info_array();
v_ordinate_array := sdo_ordinate_array();
v_elem_info_array.extend(3);
v_elem_info_array(1) := 1;
v_elem_info_array(2) := 103;
v_elem_info_array(3) := 1;
v_ordinate_array.extend(12);
v_ordinate_array(1) := -109.2693;
v_ordinate_array(2) := 45.00528;
v_ordinate_array(3) := -104.0577;
v_ordinate_array(4) := 44.99743;
v_ordinate_array(5) := -104.05325;
v_ordinate_array(6) := 41.0014;
v_ordinate_array(7) := -111.04673;
v_ordinate_array(8) := 40.99795;
v_ordinate_array(9) := -111.0552;
v_ordinate_array(10) := 45.00132;
v_ordinate_array(11) := -109.2693;
v_ordinate_array(12) := 45.00528;
v_boundary := sdo_geometry (2007, 8307, null, v_elem_info_array, v_ordinate_array);
dbms_output.put_line(SDO_UTIL.TO_WKTGEOMETRY(v_boundary));
END;