rrt2010

ORA-20004 Exception when inserting shape to database using st_geometry

Discussion created by rrt2010 on Sep 30, 2013
Latest reply on Oct 13, 2014 by jeff.pace
Hi ,

I am working on an application where i am inserting the shape from text in the data base using st_geometry API. The functionality works fine for smaller length of the string(19358) , but for a large length like 131072, it fails with the error below :

Error Code is -20004 ORA-20004: Error generating shape from text: Memory allocation error ( ORA-20004: Error generating shape from text: Memory allocation error (-103).
ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 12
ORA-06512: at "SDE.ST_GEOMFROMTEXT", line 61

The string is like "MULTIPOLYGON ((( -97.50560300 32.29941400, -97.50562700 32.29942700, -97.50566600 32.29942000, -97.50569100 32.29943300, -97.50567500 32.29945400, -97.50535800 32.29951200, -97.50534300 32.29953200, -97.50536700 32.29954500, -97.50540700 32.29953800, -97.50543100 32.29955100, -97.50541500 32.29957200, -97.50513800 32.29962300, -97.50512300 32.29964300, -97.50514700 32.29965600, -97.50518600 32.29964900, -97.50521100 32.29966200, -97.50519500 32.29968300, -97.50515600 32.29969000, -97.50514000 32.29971000, -97.50516400 32.29972300, -97.50520300 32.29971600, -97.50522800 32.29972900, -97.50521200 32.29975000, -97.50517300 32.29975700, -97.50515700 32.29977700, -97.50518100 32.29979000, -97.50522100 32.29978300, -97.50524500 32.29979600, -97.50522900 32.29981700, -97.50515000 32.29983200, -97.50513500 32.29985200, -97.50515900 32.29986500, -97.50523800 32.29985000, -97.50526200 32.29986400, -97.50524700 32.29988400, -97.50516700 32.29989900, -97.50515200 32.29991900, -97.50517600 32.29993200, -97.50527500 32.29991300, -97.50532200 32.30009800, -97.50537000 32.30012500, -97.50535400 32.30014600, -97.50527500 32.30016000, -97.50522900 32.30022100, -97.50525300 32.30023400, -97.50528400 32.30019300, -97.50538300 32.30017500, -97.50539600 32.30022600, -97.50533400 32.30030700, -97.50535800 32.30032000, -97.50539700 32.30031300, -97.50542200 32.30032600, -97.50540600 32.30034700, -97.50471400 32.30047500, -97.50469600 32.30040700, -97.50410400 32.30051600, -97.50412100 32.30058300, -97.50384400 32.30063400, -97.50386200 32.30070100, -97.50364300 32.30074200, -97.50362800 32.30076200, -97.50365200 32.30077400, -97.50377100 32.30075300, -97.50379500 32.30076600, -97.50377900 32.30078700, -97.50366100 32.30080900, -97.50364600 32.30082900, -97.50366900 32.30084200, -97.50378800 32.30082000, -97.50381200 32.30083300, -97.50379600 32.30085400, -97.50367800 32.30087600, -97.50366200 32.30089600, -97.50368600 32.30090900, -97.50376500 32.30089400, -97.50379000 32.30090800, -97.50377400 32.30092900, -97.50369500 32.30094300, -97.50368000 32.30096300, -97.50370300 32.30097600, -97.50378200 32.30096100, -97.50380700 32.30097500, -97.50379100 32.30099600, -97.50371200 32.30101000, -97.50369700 32.30103000, -97.50372000 32.30104300, -97.50380000 32.30102900, -97.50382400 32.30104200, -97.50379300 32.30108300, -97.50384100 32.30110900, -97.50381000 32.30115000, -97.50385800 32.30117600, -97.50388800 32.30129300, -97.50400700 32.30127200, -97.50403700 32.30139000, -97.50408500 32.30141600, -97.50409800 32.30146600, -97.50694400 32.30094300, -97.50650800 32.29923100, -97.50561800 32.29939400, -97.50560300 32.29941400),( -97.50584800 32.29940400, -97.50586400 32.29938300, -97.50588800 32.29939700, -97.50587300 32.29941800, -97.50584800 32.29940400),( -97.50573000 32.29942600, -97.50574500 32.29940500, -97.50577000 32.29941900, -97.50575400 32.29944000, -97.50573000 32.29942600),( -97.50547000 32.29954400, -97.50548500 32.29952300, -97.50551000 32.29953700, -97.50549400 32.29955800, -97.50547000 32.29954400)...."
Above is just a part of a very long string.
I tried using ST_GeomFromText (as found on some forum) , but got the same error.
The above string is generated using API SE_shape_as_text().
I am using ProC to insert the value in DataBase and am  creating a temporary CLOB . The CLOB object is filled with the value returned from  SE_shape_as_text() because direct insertion of a huge string will give Oracle errors for large string.

Kindly provide your inputs.

Regards.

Outcomes