Hello,
I'm trying to do some tests on a big table of sdo_geometries.
For that purpose I want to "translate" the oracle sdo_geometries to sde.st_geometry.
In pure SQL I can simply do that like this:
... sde.st_geomfromwkb(sdo_util.to_wkbgeometry(a.SHAPE), 25832) ...
In my PL/SQL function I tried it this way:
DECLARE
sdegeom sde.ST_GEOMETRY;
...
sdegeom := SDE.ST_GEOMETRY_OPERATORS.st_geomfromwkb(sdo_util.to_wkbgeometry(rec.SHAPE), 25832);
But I get this error:
PLS-00224: Objekt 'SDE.ST_GEOMETRY_OPERATORS.ST_GEOMFROMWKB' muss für diese Verwendungsart Type-Funktion oder Array sein
I'm not really famliliar with PL/SQL, so any advice would be nice!
Is there a better way to translate from sdo_geom to st_geometry?
Greetings!!
Hello Alex,
thanks for your answer.
In this example the "st_geomfromwkb" function is used within a SQL statement.
What I want to do, is use it to populate a variable in an pl/sql statement.
Luckily I found a solution:
As odd as it sounds, the trick is to append an "_f" to the function name.
DECLARE
sdegeom sde.ST_GEOMETRY;
...
sdegeom := SDE.ST_GEOMETRY_OPERATORS.st_geomfromwkb_f(sdo_util.to_wkbgeometry(rec.SHAPE), 25832);
I don't really understand why this is necessary. But hey: it works...
Greetings!!