when creating Oracle ST_Geometry type variables can not keep them in secion and presents problems. when you have a loop which executes a function ST_Difference () the system has an error memory OCI if statement is executed outside the procedure has no errors but within the if
To clarify, are you using arcsde 10.0 SP2? Also, is the sde server windows or linux? Finally, when you run the query inside the loop and it eventually fails, is the memory of the extproc process gradually increasing? Would you be able to monitor that please?
I have following example: Two simple polygons touch in single point. I do st_union of this two polygons and then st_difference with third polygon which is bigger than union of first two polygons. Result is not valid geometry and st_astext fails.
This example fails on versions: ArcSDE 9.2 sp6, 9.3.1 and 10 (Oracle 10gR2/Windows 2003 and 11g/Windows 2008/64 bit) ArcSDE 9.2 sp6 (Oracle 10gR2/IBM Aix 5.3 /64 bit)
Is this bug in SDE.ST_GEOMETRY_SHAPELIB_PKG package.
select sde.st_astext(geomdif) from ( select sde.st_difference (c.geom , zs.st_geom) geomdif from ( select sde.st_union (a.geom , b.geom ) st_geom from (select sde.st_geometry('POLYGON (( 1 1, 2 1, 2 2, 1 2,1 1))',1) geom from dual) a, (select sde.st_geometry('POLYGON(( 3 2,3 3,2 3, 2 2,3 2))',1) geom from dual ) b ) zs , (select sde.st_geometry ('POLYGON (( 0 0, 4 0 , 4 4, 0 4 , 0 0 ))',1) geom from dual ) c )
ORA-28579: network error during callback from external procedure agent ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 70 ORA-06512: at "SDE.ST_GEOMETRY_OPERATORS", line 68