Invoking SDE.ST_POLYFROMTEXT() results in "ORA-20004: Error generating shape from text: (-3)." What does the error code "-3" mean?

388
0
03-22-2019 11:00 AM
MarkMercer
New Contributor

ArcSDE 10.4.1 on Oracle 11.2.0.4, Windows, 64-bit

I have a SQL statement that invokes the SDE function ST_POLYFROMTEXT.  I am using it to generate polygons from a given set of vertices.  I list the vertices in counterclockwise order and close the figure with the starting point.  When I run this statement in SQL (limiting to one row as a test):

 

select sde.st_polyfromtext('''polygon (('||bottomleftx||' '||bottomlefty||', '||bottomrightx||' '||bottomrighty||', '||toprightx||' '||toprighty||', '||topleftx||' '||toplefty||', '||bottomleftx||' '||bottomlefty||'))''', 4)

from psd.tblplatinfo where bottomleftx is not null and rownum = 1

/

 

I get this:

 

ERROR at line 1:

ORA-20004: Error generating shape from text:   (-3).

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

ORA-06512: at "SDE.ST_POLYFROMTEXT", line 59

 

I have googled on this, and found nothing useful; also I could not find anything that told me what the error code meant when I checked the ESRI support website.


If I take the function out, to capture what’s actually being generated:

 

select '''polygon (('||bottomleftx||' '||bottomlefty||', '||bottomrightx||' '||bottomrighty||', '||toprightx||' '||toprighty||', '||topleftx||' '||toplefty||', '||bottomleftx||' '||bottomlefty||'))'''

from psd.tblplatinfo where bottomleftx is not null and rownum = 1

/

 

It yields:

 

SQL> /

 

'''POLYGON(('||BOTTOMLEFTX||''||BOTTOMLEFTY||','||BOTTOMRIGHTX||''||BOTTOMRIGHTY

--------------------------------------------------------------------------------

'polygon ((1326474 724996, 1327270 726363, 1326563 726775, 1325767 725407, 1326474 724996))'

 

If I run that:

 

select sde.st_polyfromtext('polygon ((1326474 724996, 1327270 726363, 1326563 726775, 1325767 725407, 1326474 724996))', 4)

from psd.tblplatinfo where bottomleftx is not null and rownum = 1

/

 

It works:

 

SQL> /

 

SDE.ST_POLYFROMTEXT('POLYGON((1326474724996,1327270726363,1326563726775,13257677

--------------------------------------------------------------------------------

ST_POLYFROMTEXT(8, 5, 1325767, 724996, 1327270, 726775, NULL, NULL, NULL, NULL,

1294376.42, 4800.66956, 4, '2C00000001000000A4B9B6FFCF15AAE4D8F98711A595A802A0CF

FC03FC868702A3A59901E595A802C9FFFC03BC868702FAF59801')

 

Any idea what the error “-3” means?  What am I doing wrong?  It must be something simple, that I am just overlooking, but I can’t seem to find it.  Any ideas much appreciated.  Thanks!


0 Kudos
0 Replies