Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Modify SDO_ELEM_INFO_ARRAY of existing geometry

User_1871Jun 8 2022 — edited Jun 11 2022

I have an existing SDO_GEOMETRY:

SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(10,10,  100,100))
--                                                          🡅

I want to modify the SDO_ELEM_INFO_ARRAY like this:
Before: (1, 1003, 1)
After: (1, 1003, 3)
How can I modify that SDO_ELEM_INFO_ARRAY value using SQL?
-----------------------------------------------------------------------
Background:
In a different post, I asked a side question about the following:
Bug: If I create a polygon/rectangle from two WKT vertices, the SDO_ELEM_INFO_ARRAY is incorrect.

https://community.oracle.com/tech/apps-infra/discussion/comment/16838025/#Comment_16838025
sdo_geometry('polygon ((10 10, 100 100))')
produces this geometry:
MDSYS.SDO_GEOMETRY(2003, NULL, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1), MDSYS.SDO_ORDINATE_ARRAY(10, 10, 100, 100))
As such, I'm hoping to work around that issue by replacing the 1 with a 3 in the SDO_ELEM_INFO_ARRAY.
-----------------------------------------------------------------------
Related:
Replace value in SDO_ELEM_INFO_ARRAY varray

This post has been answered by _jum on Jun 8 2022
Jump to Answer
Comments
Post Details
Added on Jun 8 2022
3 comments
213 views