FROM_WKTGEOMETRY returns NULL?
I find that the FROM_WKTGEOMETRY function returns null. For example, the PL/SQL below round trips from SDO_GEOMETRY to WKT and back and produces the output:
DECLARE
wktgeom CLOB;
val_result VARCHAR2(5);
geom_result SDO_GEOMETRY;
geom SDO_GEOMETRY;
BEGIN
SELECT sdo_geometry(2001, 8307, null, sdo_elem_info_array(1,1,1), sdo_ordinate_array(10, 10)) into geom FROM DUAL;
-- To WKT geometry
wktgeom := SDO_UTIL.TO_WKTGEOMETRY(geom);
DBMS_OUTPUT.PUT_LINE('To WKT geometry result = ' || wktgeom);
-- From WKT geometry
geom_result := SDO_UTIL.FROM_WKTGEOMETRY(wktgeom);
if geom_result is null then
dbms_output.put_line('The geom_result variable is null');
end if;
END;
To WKT geometry result = POINT (10.0 10.0)
The geom_result variable is null
Tagged:
0