1

Topic: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

I ask the help! Two weeks of reading of the Internet and approbation of different methods of result did not give. Also search on sql.ru did not crown success.
The Initial data.
There is a DB in which the space data in format ArcGIS (St_Geometry) is allocated.
Accordingly, the library is fastened to a DBMS st_shapelib.dll.
There is an exterior application (on a C ++), not using API ArcSDE, but the reading and writing space data. Format WKB is for this purpose used. Access to Oracle is carried out by means of OCI.
For reading/record of the binary data (BLOB) in format WKB, accordingly, it is used OCILobLocator.
Examples of requests:
Reading

SELECT "OBJECTID", SDE.ST_AsBinary ("SHAPE") as "SHAPE" FROM "SDE". "MYTABLE"

Record

UPDATE "SDE". "MYTABLE" SET "SHAPE" = SDE.ST_GeomFromWKB (:GEOM, 3405) WHERE "OBJECTID" = 1

A problem Essence.
At reading of problems is not present.
At attempt of an insertion/change of record I receive the following error:

ORA wrote:

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

Thus the call from application is correct, as if the same to do with the table, where a field of the space data not SDE.ST_Geometry, and regular from Oracle Spatial - SDO_GEOMETRY record transits successfully (by itself, in this case through "SHAPE" = MDSYS.SDO_GEOMETRY ("SHAPE_BLOB", 3405)).
Means, BLOB it is transferred correctly.
That is curious, performance concerning ArcSDE the same code and with the same data that causes the OCI-appendix, but from SQL Developer, fulfills remarkably!

-- It works!
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

Means, the library st_shapelib.dll is fastened correctly.
Whence then "ORA-03001: unimplemented feature" by a call through OCI SDE.ST_GeomFromWKB?
Something to understand on
ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 237
ORA-06512: at "SDE.ST_GEOMETRY_OPERATORS", line 162
Too it is impossible, as the specified lines do not explain an essence of a problem and, probably, generally it do not concern:
SDE.ST_GEOMETRY_SHAPELIB_PKG
[spoiler] create or replace Package st_geometry_shapelib_pkg AS
/******************************************************************************
name: iso_Shapelib
purpose:
revisions:
ver date author description
--------- ---------- --------------- ------------------------------------
1.0 3/6/2005 1. created this package.
******************************************************************************/
c_package_release Constant pls_integer: = 1111;
Procedure geometryfromtext (shptxt IN clob;
srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
Type IN number;
numpts IN Out number;
entity IN Out number;
minx IN Out number;
miny IN Out number;
maxx IN Out number;
maxy IN Out number;
minz IN Out number;
maxz IN Out number;
minm IN Out number;
maxm IN Out number;
area IN Out number;
len IN Out number;
points IN Out blob);
Procedure astext (srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
pls_numpts IN number;
pls_entity IN number;
points IN blob;
shptxt IN Out clob);
Procedure spatialrelations1 (relation IN number;
str_val IN varchar2;
s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_points IN blob;
s2_srid IN number;
s2_false_x IN number;
s2_false_y IN number;
s2_xyunits IN number;
s2_false_z IN number;
s2_zunits IN number;
s2_false_m IN number;
s2_munits IN number;
s2_proj_str IN varchar2;
s2_numpts IN number;
s2_entity IN number;
s2_points IN blob;
has_relation IN Out number);
Procedure spatialrelations2 (relation IN number;
str_val IN varchar2;
srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_points IN blob;
s2_numpts IN number;
s2_entity IN number;
s2_points IN blob;
has_relation IN Out number);
Procedure asbinary (srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
Type IN number;
numpts IN number;
points IN blob;
wkb_blob IN Out blob);
Procedure geomfromshape (Function IN number;
shp_blob IN blob;
srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
numpts IN Out number;
entity IN Out number;
minx IN Out number;
miny IN Out number;
maxx IN Out number;
maxy IN Out number;
minz IN Out number;
maxz IN Out number;
minm IN Out number;
maxm IN Out number;
area IN Out number;
len IN Out number;
points IN Out blob);
Procedure getshape (shp_entity IN number;
shp_numpts IN number;
shp_blob IN blob;
srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
numpts IN Out number);
Procedure geom_operation (operation IN number;
in_value1 IN number;
in_value2 IN number;
in_value3 IN number;
s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_points IN blob;
s2_numpts IN Out number;
s2_entity IN Out number;
s2_minx IN Out number;
s2_miny IN Out number;
s2_maxx IN Out number;
s2_maxy IN Out number;
s2_minz IN Out number;
s2_maxz IN Out number;
s2_minm IN Out number;
s2_maxm IN Out number;
s2_area IN Out number;
s2_len IN Out number;
s2_points IN Out blob);
Procedure coorddim (s1_points IN blob;
typeval IN Out number);
Procedure envelope (s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_points IN blob;
s2_numpts IN Out number;
s2_entity IN Out number;
s2_minx IN Out number;
s2_miny IN Out number;
s2_maxx IN Out number;
s2_maxy IN Out number;
s2_minz IN Out number;
s2_maxz IN Out number;
s2_minm IN Out number;
s2_maxm IN Out number;
s2_area IN Out number;
s2_len IN Out number;
s2_points IN Out blob);
Procedure getdimtype (s1_points IN blob;
typeval IN Out number);
Procedure isclosed (s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_points IN blob;
isring IN number;
value IN Out number);
Procedure issimple (s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_points IN blob;
value IN Out number);
Procedure spatial_operations1 (operation IN number;
s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_points IN blob;
s2_srid IN number;
s2_false_x IN number;
s2_false_y IN number;
s2_xyunits IN number;
s2_false_z IN number;
s2_zunits IN number;
s2_false_m IN number;
s2_munits IN number;
s2_proj_str IN varchar2;
s2_numpts IN number;
s2_entity IN number;
s2_points IN blob;
s3_numpts IN Out number;
s3_entity IN Out number;
s3_minx IN Out number;
s3_miny IN Out number;
s3_maxx IN Out number;
s3_maxy IN Out number;
s3_minz IN Out number;
s3_maxz IN Out number;
s3_minm IN Out number;
s3_maxm IN Out number;
s3_area IN Out number;
s3_len IN Out number;
s3_points IN Out blob);
Procedure spatial_operations2 (operation IN number;
srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_points IN blob;
s2_numpts IN number;
s2_entity IN number;
s2_points IN blob;
s3_numpts IN Out number;
s3_entity IN Out number;
s3_minx IN Out number;
s3_miny IN Out number;
s3_maxx IN Out number;
s3_maxy IN Out number;
s3_minz IN Out number;
s3_maxz IN Out number;
s3_minm IN Out number;
s3_maxm IN Out number;
s3_area IN Out number;
s3_len IN Out number;
s3_points IN Out blob);
Procedure getnumvalue (operation IN number;
srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_points IN blob;
value IN Out number);
Procedure transform (geotranid IN number;
s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_minx IN number;
s1_miny IN number;
s1_maxx IN number;
s1_maxy IN number;
s1_minz IN number;
s1_maxz IN number;
s1_minm IN number;
s1_maxm IN number;
s1_area IN number;
s1_len IN number;
s1_points IN blob;
s2_srid IN number;
s2_false_x IN number;
s2_false_y IN number;
s2_xyunits IN number;
s2_false_z IN number;
s2_zunits IN number;
s2_false_m IN number;
s2_munits IN number;
s2_proj_str IN varchar2;
s2_numpts IN Out number;
s2_entity IN Out number;
s2_minx IN Out number;
s2_miny IN Out number;
s2_maxx IN Out number;
s2_maxy IN Out number;
s2_minz IN Out number;
s2_maxz IN Out number;
s2_minm IN Out number;
s2_maxm IN Out number;
s2_area IN Out number;
s2_len IN Out number;
s2_points IN Out blob);
Procedure getfeature (s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_points IN blob;
s2_numpts IN Out number;
s2_entity IN Out number;
s2_numparts IN Out number;
s2_parts IN Out SDE.int_array_tab;
s2_num_subparts IN Out number;
s2_subparts IN Out SDE.int_array_tab;
s2_properties IN Out number;
s2_x IN Out SDE.flt_array_tab;
s2_y IN Out SDE.flt_array_tab;
s2_z IN Out SDE.flt_array_tab;
s2_m IN Out SDE.flt_array_tab);
Procedure gen_cell_arrays (s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_minx IN number;
s1_miny IN number;
s1_maxx IN number;
s1_maxy IN number;
s1_points IN blob;
operation IN number;
distance IN number;
grid IN number;
grid2 IN number;
grid3 IN number;
num_parent_cell IN Out number;
parent_cell_t IN Out SDE.int_array_tab;
num_tess_cell IN Out number;
tess_cell_t IN Out SDE.int_array_tab;
grid1_new IN Out number;
grid2_new IN OUT number;
grid3_new IN OUT number);
Procedure test_features (operation IN number;
s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_minx IN number;
s1_miny IN number;
s1_maxx IN number;
s1_maxy IN number;
s1_points IN blob;
distance IN number;
bnd_rids_cnt IN number;
entity IN SDE.int_array_tab;
numpts IN SDE.int_array_tab;
srid IN SDE.int_array_tab;
points IN SDE.blob_array_tab;
row_id IN SDE.bnd_rowid_tab;
rid_array IN Out SDE.bnd_rowid_tab;
rid_array_cnt IN Out number);
Procedure test_features2 (operation IN number;
s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s2_srid IN number;
s2_false_x IN number;
s2_false_y IN number;
s2_xyunits IN number;
s2_false_z IN number;
s2_zunits IN number;
s2_false_m IN number;
s2_munits IN number;
s2_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_minx IN number;
s1_miny IN number;
s1_maxx IN number;
s1_maxy IN number;
s1_points IN blob;
distance IN number;
bnd_rids_cnt IN number;
entity IN SDE.int_array_tab;
numpts IN SDE.int_array_tab;
srid IN SDE.int_array_tab;
points IN SDE.blob_array_tab;
row_id IN SDE.bnd_rowid_tab;
rid_array IN Out SDE.bnd_rowid_tab;
rid_array_cnt IN Out number);
Procedure verify (s1_srid IN number;
s1_false_x IN number;
s1_false_y IN number;
s1_xyunits IN number;
s1_false_z IN number;
s1_zunits IN number;
s1_false_m IN number;
s1_munits IN number;
s1_proj_str IN varchar2;
s1_numpts IN number;
s1_entity IN number;
s1_points IN blob;
s2_numpts IN Out number;
s2_entity IN Out number;
s2_minx IN Out number;
s2_miny IN Out number;
s2_maxx IN Out number;
s2_maxy IN Out number;
s2_minz IN Out number;
s2_maxz IN Out number;
s2_minm IN Out number;
s2_maxm IN Out number;
s2_area IN Out number;
s2_len IN Out number;
s2_points IN Out blob);
Procedure generate_ellipse (center_x IN number;
center_y IN number;
center_z IN number;
center_m IN number;
semiMajorAxis IN number;
semiMinorAxis IN number;
angle IN number;
numpts IN number;
srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
s2_numpts IN Out number;
s2_entity IN Out number;
s2_minx IN Out number;
s2_miny IN Out number;
s2_maxx IN Out number;
s2_maxy IN Out number;
s2_minz IN Out number;
s2_maxz IN Out number;
s2_minm IN Out number;
s2_maxm IN Out number;
s2_area IN Out number;
s2_len IN Out number;
s2_points IN Out blob);
Procedure generate_circle (center_x IN number;
center_y IN number;
center_z IN number;
center_m IN number;
radius IN number;
numpts IN number;
srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
s2_numpts IN Out number;
s2_entity IN Out number;
s2_minx IN Out number;
s2_miny IN Out number;
s2_maxx IN Out number;
s2_maxy IN Out number;
s2_minz IN Out number;
s2_maxz IN Out number;
s2_minm IN Out number;
s2_maxm IN Out number;
s2_area IN Out number;
s2_len IN Out number;
s2_points IN Out blob);
Procedure generate_wedge (center_x IN number;
center_y IN number;
center_z IN number;
center_m IN number;
startAngle IN number;
endAngle IN number;
outerRadius IN number;
innerRadius IN number;
numpts IN number;
srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
s2_numpts IN Out number;
s2_entity IN Out number;
s2_minx IN Out number;
s2_miny IN Out number;
s2_maxx IN Out number;
s2_maxy IN Out number;
s2_minz IN Out number;
s2_maxz IN Out number;
s2_minm IN Out number;
s2_maxm IN Out number;
s2_area IN Out number;
s2_len IN Out number;
s2_points IN Out blob);
Procedure sdexml_to_text (xml IN blob;
text_clob IN Out clob);
End st_geometry_shapelib_pkg; [/spoiler]
SDE.ST_GEOMETRY_OPERATORS
[spoiler] create or replace Package st_geometry_operators Authid current_user
/***********************************************************************
*
*n {st_Geometry_Operators.sps} - st_Geometry operators.
*
*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*
*p purpose:
* this pl/sql package specification defines operators
* to support the st_Geometry type.
*e
*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*
*x legalese:
*
* copyright 1992-2004 esri
*
* trade secrets: esri proprietary and confidential
* unpublished material - all rights reserved under the
* copyright laws of the united states.
*
* for additional information, contact:
* environmental systems research institute, inc.
* attn: contracts dept
* 380 new york street
* redlands, california, usa 92373
*
* email: contracts@esri.com
*
*e
*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*
*h history:
*
* kevin watt 12/02/04 original coding.
*e
***********************************************************************/
IS
c_package_release Constant pls_integer: = 1123;
mtrue Constant pls_integer: = 1;
mfalse Constant pls_integer: = 0;
-- st_Geometry operator functions (isocomn.h st_Geometry_Operators enum)
geomfromshape Constant pls_integer: = 1;
pointfromshape Constant pls_integer: = 2;
linefromshape Constant pls_integer: = 3;
polyfromshape Constant pls_integer: = 4;
mpointfromshape Constant pls_integer: = 5;
mlinefromshape Constant pls_integer: = 6;
mpolyfromshape Constant pls_integer: = 7;
st_geomfromwkb Constant pls_integer: = 8;
st_pointfromwkb Constant pls_integer: = 9;
st_linefromwkb Constant pls_integer: = 10;
st_polyfromwkb Constant pls_integer: = 11;
st_mpointfromwkb Constant pls_integer: = 12;
st_mlinefromwkb Constant pls_integer: = 13;
st_mpolyfromwkb Constant pls_integer: = 14;
st_boundary Constant pls_integer: = 15;
st_buffer Constant pls_integer: = 16;
st_centroid Constant pls_integer: = 17;
st_convexhull Constant pls_integer: = 18;
st_startpoint Constant pls_integer: = 19;
st_endpoint Constant pls_integer: = 20;
st_linestringn Constant pls_integer: = 21;
st_pointonsurface Constant pls_integer: = 22;
st_exteriorring Constant pls_integer: = 23;
st_interiorringn Constant pls_integer: = 24;
st_numinteriorring Constant pls_integer: = 25;
st_numgeometries Constant pls_integer: = 26;
st_geometryn Constant pls_integer: = 27;
st_difference Constant pls_integer: = 28;
st_union Constant pls_integer: = 29;
st_symmetricdiff Constant pls_integer: = 30;
st_pointn Constant pls_integer: = 31;
st_intersection Constant pls_integer: = 32;
st_transform Constant pls_integer: = 33;
st_verify Constant pls_integer: = 34;
Function st_astext_f (prim SDE.st_geometry)
Return clob deterministic;
Function st_asbinary_f (prim SDE.st_geometry)
Return blob deterministic;
Function st_geomfromwkb_f (wkb_blob blob, srid number)
Return SDE.st_geometry deterministic;
Function st_pointfromwkb_f (wkb_blob blob, srid number)
Return SDE.st_geometry deterministic;
Function st_linefromwkb_f (wkb_blob blob, srid number)
Return SDE.st_geometry deterministic;
Function st_polyfromwkb_f (wkb_blob blob, srid number)
Return SDE.st_geometry deterministic;
Function st_mpointfromwkb_f (wkb_blob blob, srid number)
Return SDE.st_geometry deterministic;
Function st_mlinefromwkb_f (wkb_blob blob, srid number)
Return SDE.st_geometry deterministic;
Function st_mpolyfromwkb_f (wkb_blob blob, srid number)
Return SDE.st_geometry deterministic;
Function st_boundary_f (prim SDE.st_geometry)
Return SDE.st_geometry deterministic;
Function st_coorddim_f (prim SDE.st_geometry)
Return number deterministic;
Function st_envelope_f (prim SDE.st_geometry)
Return SDE.st_polygon deterministic;
Function st_geometrytype_f (prim SDE.st_geometry)
Return varchar2 deterministic;
Function st_is3d_f (prim SDE.st_geometry)
Return number deterministic;
Function st_ismeasured_f (prim SDE.st_geometry)
Return number deterministic;
Function st_isclosed_f (prim SDE.st_geometry)
Return number deterministic;
Function st_isempty_f (prim SDE.st_geometry)
Return number deterministic;
Function st_isring_f (prim SDE.st_geometry)
Return number deterministic;
Function st_issimple_f (prim SDE.st_geometry)
Return number deterministic;
Function st_area_f (prim SDE.st_geometry)
Return number deterministic;
Function st_areaunits_f (prim SDE.st_geometry, unit varchar2)
Return number deterministic;
Function st_buffer_f (prim SDE.st_geometry, distance number)
Return SDE.st_geometry deterministic;
Function st_centroid_f (prim SDE.st_geometry)
Return SDE.st_geometry deterministic;
Function st_convexhull_f (prim SDE.st_geometry)
Return SDE.st_geometry deterministic;
Function st_dimension_f (prim SDE.st_geometry)
Return number deterministic;
Function st_startpoint_f (prim SDE.st_geometry)
Return SDE.st_point deterministic;
Function st_endpoint_f (prim SDE.st_geometry)
Return SDE.st_point deterministic;
Function st_pointonsurface_f (prim SDE.st_geometry)
Return SDE.st_point deterministic;
Function st_exteriorring_f (prim SDE.st_geometry)
Return SDE.st_linestring deterministic;
Function st_interiorringn_f (prim SDE.st_geometry, ring_pos number)
Return SDE.st_linestring deterministic;
Function st_numinteriorring_f (prim SDE.st_geometry)
Return number deterministic;
Function st_numgeometries_f (prim SDE.st_geometry)
Return number deterministic;
Function st_geometryn_f (prim SDE.st_geometry, position number)
Return SDE.st_geometry;
Function st_difference_f (shape1 SDE.st_geometry, shape2 SDE.st_geometry)
Return SDE.st_geometry deterministic;
Function st_union_f (shape1 SDE.st_geometry, shape2 SDE.st_geometry)
Return SDE.st_geometry deterministic;
Function st_symmetricdiff_f (shape1 SDE.st_geometry, shape2 SDE.st_geometry)
Return SDE.st_geometry deterministic;
Function st_pointn_f (prim SDE.st_geometry, point_pos number)
Return SDE.st_point deterministic;
Function st_intersection_f (shape1 SDE.st_geometry, shape2 SDE.st_geometry)
Return SDE.st_geometry deterministic;
Function st_transform_f (prim SDE.st_geometry, srid number)
Return SDE.st_geometry deterministic;
Function st_transform_geotranid_f (prim SDE.st_geometry, srid number, geotranid number)
Return SDE.st_geometry deterministic;
Function st_entity_f (prim SDE.st_geometry)
Return number;
Function st_numpoints_f (prim SDE.st_geometry)
Return number;
Function st_minx_f (prim SDE.st_geometry)
Return number;
Function st_maxx_f (prim SDE.st_geometry)
Return number;
Function st_miny_f (prim SDE.st_geometry)
Return number;
Function st_maxy_f (prim SDE.st_geometry)
Return number;
Function st_minz_f (prim SDE.st_geometry)
Return number;
Function st_maxz_f (prim SDE.st_geometry)
Return number;
Function st_minm_f (prim SDE.st_geometry)
Return number;
Function st_maxm_f (prim SDE.st_geometry)
Return number;
Function st_length_f (prim SDE.st_geometry)
Return number;
Function st_srid_f (prim SDE.st_geometry)
Return number;
Function st_x_f (prim SDE.st_geometry)
Return number deterministic;
Function st_y_f (prim SDE.st_geometry)
Return number deterministic;
Function st_z_f (prim SDE.st_geometry)
Return number deterministic;
Function st_m_f (prim SDE.st_geometry)
Return number deterministic;
Function st_distance_f (shape1 SDE.st_geometry, shape2 SDE.st_geometry)
Return number deterministic;
Function st_distance_f (shape1 SDE.st_geometry, shape2 SDE.st_geometry, unit varchar2)
Return number deterministic;
Function st_disjoint_f (shape1 SDE.st_geometry, shape2 SDE.st_geometry)
Return number deterministic;
Procedure transform_srch_shape (shape IN SDE.st_geometry;
shape_out OUT SDE.st_geometry;
from_srid IN SDE.st_spref_util.srid_t;
to_srid IN SDE.st_spref_util.srid_t);
Function st_verify_f (shape SDE.st_geometry)
Return SDE.st_geometry deterministic;
Pragma Restrict_References (st_geometry_operators, wnds);
End st_geometry_operators; [/spoiler]
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
st_shapelib.dll from ArcGIS 10 with extreme service-pakom, what found (it seems, sp5) - version 10.0.5.2063 from 5/22/2012
I will be glad to any hypotheses!
When all methods are tried, and the result all is not present, - read at last the instruction!

2

Re: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

Time is not present versions, I will ask on - to another.
For what reason the exterior stored procedure can not fulfill by its call through OCI whereas from SQL Developer it fulfills normally?

3

Re: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

MustDie wrote:

the specified lines do not explain an essence of a problem and, probably, generally it do not concern

It should cause some suspicions that you look not there. Now glance in a body instead of bake.

4

Re: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

MustDie;
Whence the confidence, what  set  in the anonymous unit coincides with type and value  a variable by a call through OCI?

5

Re: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

dbms_photoshop wrote:

it is passed...
Do not prompt, how? I am not deeply familiar With Oraklom.
Everything that found - under spoilers in the first message.
Really it is a question about the functional lying in dll-ke from ArcGIS and fastened to DB (st_shapelib.dll).
How to glance in a body I do not know.

6

Re: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

env wrote:

MustDie;
Whence the confidence, what  set  in the anonymous unit coincides with type and value  a variable by a call through OCI?

As experiment I added a blob-field in the same table where wrote down value through  a variable.
Then in sql developer caused the same ST_GeomFromWKB on this already written down in the table blob.
All fulfilled correctly.
On the basis of it drew an output that blob through OCI I transfer correctly, and ST_GeomFromWKB it understands - on an output the necessary geometry.
Except that, same blob I transfer in designer SDO_GEOMETRY and I receive correct geometry.
The problem arises then when there is an attempt to transfer   as parameter at once to request where is ST_GeomFromWKB.

7

Re: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

MustDie;
[quote =] added a blob-field in the same table where wrote down value through  a variable.
Then in sql developer caused the same ST_GeomFromWKB on this already written down in the table blob.
All fulfilled correctly.
On the basis of it drew an output that blob through OCI I transfer correctly

Wrong output
With the registration of that in a call

SDE.ST_GeomFromWKB

there are no packet instructions, there is no warranty that procedure accepting  is caused.
Therefore the citation will work above for a case - "successfully there transits implicit conversion of type  a variable in ", "there does not transit type conversion  a variable in type described in the function signature" and "successfully there transits conversion  in type described in the function signature".

8

Re: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

MustDie wrote:

do not prompt, how?

select *
from dba_source
where owner = ' SYS ' and name = ' STANDARD ' and type = ' PACKAGE BODY ' and line = 5;

The you will substitute.

9

Re: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

MustDie wrote:

it is passed...
Do not prompt, how? I am not deeply familiar With Oraklom.
Everything that found - under spoilers in the first message.
Really it is a question about the functional lying in dll-ke from ArcGIS and fastened to DB (st_shapelib.dll).
How to glance in a body I do not know.

So, at something to look it turned out... But not all.
In "Body" SDE.ST_GEOMETRY_OPERATORS the problem line 162 is selected by color:
[spoiler]

Function st_geomfromwkb_f (wkb_blob blob, srid number)
Return SDE.st_geometry
IS
spref SDE.spx_util.spatial_ref_record_t;
temp varchar2 (1);
tempraw raw (1);
minz number;
maxz number;
minm number;
maxm number;
rc number;
shape SDE.st_geometry: = SDE.st_geometry (0,0,0,0,0,0,0,0,0,0,0,0,0, empty_blob ());
len integer;
Begin
If wkb_blob IS NULL Then
return NULL;
End If;
len: = dbms_lob.getlength (wkb_blob);
If len = 0 Then
return shape;
End If;
spref.srid: = srid;
rc: = SDE.st_spref_util.select_spref (spref);
If rc! = SDE.st_type_user.se_success THEN
raise_application_error (SDE.st_type_util.st_no_srid, ' srid ' || spref.srid ||
' does not exist in st_spatial_references table. ');
End If;
shape.points: = empty_blob ();
shape.numpts: = 0;
shape.entity: = 0;
shape.minx: = 0;
shape.miny: = 0;
shape.maxx: = 0;
shape.maxy: = 0;
shape.area: = 0;
shape.len: = 0;
shape.minz: = NULL;
shape.maxz: = NULL;
shape.minm: = NULL;
shape.maxm: = NULL;
temp: = lpad (' a ', 1, ' a ');
tempraw: = utl_raw.cast_to_raw (temp);
shape.points: = tempraw;
[color=red] SDE.st_geometry_shapelib_pkg.geomfromshape (SDE.st_geometry_operators.st_geomfromwkb,wkb_blob,spref.srid,spref.x_offset;
spref.y_offset,spref.xyunits,spref.z_offset,spref.z_scale;
spref.m_offset,spref.m_scale,spref.Definition,shape.numpts;
shape.entity,shape.minx,shape.miny,shape.maxx,shape.maxy;
shape.minz,shape.maxz,shape.minm,shape.maxm,shape.area,shape.len,shape.points); [/color]
if (shape.numpts IS NULL and shape.entity = 0) then
shape.numpts: = 0;
shape.minx: = NULL;
shape.maxx: = NULL;
shape.miny: = NULL;
shape.maxy: = NULL;
shape.minz: = NULL;
shape.maxz: = NULL;
shape.minm: = NULL;
shape.maxm: = NULL;
End if;
shape.srid: = srid;
Return (shape);
End st_geomfromwkb_f;

[/spoiler]
It is the link to function in SDE.ST_GEOMETRY_SHAPELIB_PKG in a sink 237 - geomfromshape. But it already "exterior " - in DLL.
[spoiler] Procedure geomfromshape (Function IN number;
shp_blob IN blob;
srid IN number;
false_x IN number;
false_y IN number;
xyunits IN number;
false_z IN number;
zunits IN number;
false_m IN number;
munits IN number;
proj_str IN varchar2;
numpts IN Out number;
entity IN Out number;
minx IN Out number;
miny IN Out number;
maxx IN Out number;
maxy IN Out number;
minz IN Out number;
maxz IN Out number;
minm IN Out number;
maxm IN Out number;
area IN Out number;
len IN Out number;
points IN Out blob)
AS
language c
name "GeomFromShape"
library st_shapelib

WITH CONTEXT
parameters (CONTEXT;
Function ocinumber;
shp_blob ociloblocator, shp_blob Indicator short;
srid ocinumber;
false_x ocinumber;
false_y ocinumber;
xyunits ocinumber;
false_z ocinumber;
zunits ocinumber;
false_m ocinumber;
munits ocinumber;
proj_str string, proj_str Indicator short, proj_str length int;
numpts ocinumber;
entity ocinumber;
minx ocinumber;
miny ocinumber;
maxx ocinumber;
maxy ocinumber;
minz ocinumber, minz Indicator short;
maxz ocinumber, maxz Indicator short;
minm ocinumber, minm Indicator short;
maxm ocinumber, maxm Indicator short;
area ocinumber;
len ocinumber;
points ociloblocator, points Indicator short); [/spoiler]
Source codes are not present. To look it does not turn out more deeply. And whether costs?
After all the call from the anonymous sql-block transits successfully. The library means function is fastened also is live.
Problem with usage of this function together with  .

10

Re: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

env wrote:

it is passed...

select *
from dba_source
where owner = ' SYS ' and name = ' STANDARD ' and type = ' PACKAGE BODY ' and line = 5;

The you will substitute itself.

Thanks! I will know on the future. While managed the interface sql developer and looked at a body of packets.

env wrote:

With the registration of that in a call

SDE.ST_GeomFromWKB

there are no packet instructions, there is no warranty that procedure accepting  is caused.
Therefore the citation will work above for a case - "successfully there transits implicit conversion of type  a variable in ", "there does not transit type conversion  a variable in type described in the function signature" and "successfully there transits conversion  in type described in the function signature".

Probably, I not absolutely understood that meant, but if it is a question about "the overloaded" functions (or as they are called in Oracle - I do not know) other functions ST_GeomFromWKB are not present.
Just in case tried instead of

SDE.ST_GeomFromWKB

Such call:

SDE.ST_GEOMETRY_OPERATORS.ST_GeomFromWKB_f

The same pattern - in sql developer fulfilled, through OCI - is not present.
And trace

Oracle wrote:

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

Says about that the necessary function is caused, but it for some reason cannot reach library with exterior procedure.
Thus other functions from this DLL are caused through OCI normally. However, there through  blob it is not written, and it is read.

11

Re: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

Tried to transfer not BLOB, and CLOB, transferring in it 16-richnuju sequence and replacing the request test on

UPDATE "SDE". "MYTABLE" SET "SHAPE" = SDE.ST_GeomFromWKB (HEXTORAW (to_char (:GEOM)), 3405) WHERE "OBJECTID" = 1

Received the absolutely same error.
Yes, forgot to tell that, as transferred BLOB is parameter for function in request to have to create for it a temporary locator (OCILobCreateTemporary). Though it hardly influences something.
There are still assumptions why the exterior stored procedure can not fulfill by its call through OCI whereas from SQL Developer it fulfills normally?

12

Re: OCI + ArcSDE = the Problem of record SDE.ST_GeomFromWKB through OCILobLocator

Somewhere function of correction of the messages disappeared. Wanted to correct a subject title, but I can not.
In general, the problem sounds a little in another way.
OCILobLocator here not and.
Simply any call SDE.ST_GeomFromWKB through OCI leads to an error. From the anonymous sql-block it is caused without problems.
Tried the following combination:
In the table where there is field St_geometry, added still field BLOB;
Through OCI one command wrote down in it the data;
The second command through OCI tried to make update fields St_geometry of field BLOB through ST_GeomFromWKB.

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

I receive the same error.

ORA wrote:

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

That says that there is somewhere a failure at a stage of a call of exterior stored procedure geomfromshape () from library "st_shapelib.dll" (see SDE.ST_GEOMETRY_SHAPELIB_PKG).
The same UPDATE, but fulfilled of SQL Developer, fulfills well.
Other stored procedures from library "st_shapelib.dll" are caused without problems, including through OCI.
All is fulfilled on behalf of the same user, that is the right here not and.
The Question: where to dig?
Why same exterior  in plsql it is fulfilled, and through oci - is not present?