NIFIGA

[RESOLVED] GDB in Oracle: Error calling SDE.St_GeomFromWKB from OCI

Discussion created by NIFIGA on Oct 3, 2017
Latest reply on Jan 18, 2018 by NIFIGA
-- The anonymous sql-block with St_GeomFromWKB is working good
DECLARE
    :GEOM BLOB;
BEGIN 
:GEOM := HEXTORAW('010200000004000000b6f3fdd497961341c74b37097b2042418941606596961341819543bb822042416f1283c05f971341ac1c5a149d20424175931884829613410ad7a350b6204241');    
UPDATE "SDE"."MYTABLE" SET "SHAPE" = SDE.ST_GeomFromWKB(:GEOM, 3405)
WHERE "OBJECTID" = 1;
END;
SELECT SDE.St_AsText(SHAPE) AS SHAPE FROM "SDE"."MYTABLE" WHERE "OBJECTID" = 1

This SQL is executed in Oracle SQL Developer with good result.

 

When my application called this function I'm got the error (using OCI):

ORA-03001: unimplemented feature
ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 237
ORA-06512: at "SDE.ST_GEOMETRY_OPERATORS", line 162

 

The BLOB value which application send as WKB is properly. 

I'm check it several methods:

- used it as parameter for constructor of SDO_GEOMETRY;

- add the blob field to the table and save BLOB in this field, then convert this value to St_Geometry.

 

The convertion from BLOB field with WKB value to the St_Geometry also propertly works in Oracle SQL Developer only. 

UPDATE "SDE"."MYTABLE" SET "SHAPE" = SDE.ST_GeomFromWKB("SHAPE_BLOB", 3405) WHERE "OBJECT"=1;

The execution this command from my external application using OCI is finished with such error:

ORA-03001: unimplemented feature
ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 237
ORA-06512: at "SDE.ST_GEOMETRY_OPERATORS", line 162

 

The message

ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 237

is meaning that error while call the funlction geomfromshape() from library "st_shapelib.dll"

 

 

Some others functions from "st_shapelib.dll" are successful calling from my application using OCI.
For example the function SDE.ST_AsBinary which calling from OCI application is works properly.

 

 

Why SDE.St_GeomFromWKB not working when its calling from OCI application?

Thanks for any ideas!

 

 

PS. Additional information.

 

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

 

 

The library st_shapelib.dll is added to Oracle Database propertly.

 

SELECT * FROM USER_LIBRARIES;

return

ST_SHAPELIB | c:\app\panuser\product\11.2.0\dbhome_1\BIN\st_shapelib.dll | Y | VALID

 

Checking "invalid" objects

select object_name, object_type from user_objects where status = 'INVALID'

returns no records.

Outcomes