ST_GEOMETRY errors in PL / SQL

650
7
08-04-2011 12:17 PM
FabianHeredia
New Contributor II
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
Reply
0 Kudos
7 Replies
anthonysanchez
New Contributor III
Hello Fabian,

You'll get better feedback if you post some more details:

1) exact error message
2) your pl/sql that is throwing the error
3) full oracle and arcsde version
4) any relevant details about the data you are processing
5) other logs, etc, etc.

good luck,

Anthony
Reply
0 Kudos
FabianHeredia
New Contributor II
1) exact error message
Attach Error
2) your pl/sql that is throwing the error
> select SDE.ST_DIFFERENCE(
> sde.st_geometry('POLYGON  (( 1173955.99799248 1311814.00098629,
> 1172003.00061466 1313290.99810766, 1168894.00144376 1309384.99925602,
> 1168905.99862777 1307521.99919029, 1171182.54314190 1307536.99464630,
> 1171172.99946189 1308966.99835963, 1171703.00138238 1308965.99893563,
> 1171712.00029439 1307691.00015045, 1171712.36893439 1307691.00424645,
> 1172160.02487080 1307694.35067845, 1172315.97187895 1308051.85775078,
> 1172375.42531901 1308587.22133528, 1172375.42531901 1308587.25000728,
> 1172373.00048700 1308975.00194364, 1171703.75504638 1308971.00424764,
> 1171701.26058238 1309340.95087198, 1172501.28311112 1309346.34120799,
> 1172507.05027913 1308489.89627919, 1172969.03402356 1309548.99900018,
> 1172969.00125556 1309548.99900018, 1173955.99799248
> 1311814.00098629),( 1171456.99971815 1311704.99823418,
> 1171693.99837437 1311644.00060213, 1172554.99805517 1310518.00200908,
> 1170596.99946135 1310504.00188107, 1171456.99971815
> 1311704.99823418))',2), sde.st_geometry('POLYGON  (( 1171182.53863618
> 1307536.99424276, 1174308.04084299 1308208.43168060, 1174268.56000339
> 1308414.23522175, 1171185.41706331 1309641.83215863, 1171182.53863618
> 1307536.99424276))',2)) from dual

3) full oracle and arcsde version

Oracle 11g R2 and ArcSDE 10 full sp
4) any relevant details about the data you are processing
difference this geometry in loop
Reply
0 Kudos
ForrestJones
Occasional Contributor II
Hi fabian,

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?

Thanks,
Reply
0 Kudos
MatjazHabic
New Contributor III
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


Matjaž
Reply
0 Kudos
TravisVal
New Contributor III
Matjaž and Fabian,

Thanks for pointing this out.  We have submitted the following to track this issue.

NIM075655: The difference function in the shapelib has errors when dealing with certain multipart polygon shapes

Travis
Reply
0 Kudos
MatjazHabic
New Contributor III
Is there any plan to resolve this issue ?

Matjaž
Reply
0 Kudos
ForrestJones
Occasional Contributor II
Hi Matjaž,

Yes we are investigating this to address in a future service pack.

Thanks
Reply
0 Kudos