Spatial (MOSC)

MOSC Banner

FROM_WKTGEOMETRY returns NULL?

edited Feb 19, 2022 2:29PM in Spatial (MOSC) Question

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:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center