0

I have a table NEW_TABLE ID and ORA_GEOMETRY

where id = 1 then

ORA_GEOMETRY = MDSYS.SDO_GEOMETRY(2003, 32638, null, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1), MDSYS.SDO_ORDINATE_ARRAY(462897.8239, 4551252.4903, 462869.6794, 4551237.1391, 462821.0656, 4551321.5734, 462770.4983, 4551381.3337, 462764.7756, 4551388.0969, 462754.1560, 4551377.4776, 462741.7481, 4551365.07, 462741.7481, 4551363.7611, 462741.7474, 4551329.2490, 462764.7750, 4551290.8697, 462808.2715, 4551232.0215, 462821.0646, 4551201.3181, 462803.1544, 4551183.4076, 462757.10, 4551173.1735, 462747.3533, 4551152.4610, 462764.0828, 4551144.0964, 462767.3352, 4551142.4702, 462780.1283, 4551122.0012, 462785.2455, 4551093.8564, 462785.2455, 4551032.4494, 462790.3627, 4550930.1047, 462823.6248, 4550861.0220, 462850.7758, 4550815.7704, 462849.2111, 4550881.4909, 462826.1833, 4551001.7460, 462826.1833, 4551065.7114, 462826.1833, 4551132.2357, 462844.0938, 4551145.0287, 462854.3284, 4551083.6219, 462867.1215, 4550983.8357, 462879.9146, 4550863.5805, 462885.0318, 4550812.4081, 462882.4728, 4550727.9744, 462869.6799, 4550633.3048, 462844.0937, 4550513.0495, 462795.4799, 4550446.5256, 462770.4995, 4550405.3075, 462775.6698, 4550405.3077, 462795.8360, 4550409.5531, 462802.7176, 4550412.9935, 462812.8183, 4550418.0442, 462829.8008, 4550425.4738, 462842.5375, 4550429.7193, 462853.1510, 4550429.7193, 462864.8268, 4550426.5353, 462879.6863, 4550415.9213, 462886.6694, 4550410.2476, 462946.4704, 4550462.0752, 462920.8524, 4550490.0220, 462915.7352, 4550538.6358, 462925.9698, 4550561.6634, 462959.2317, 4550561.6634, 462983.6238, 4550561.6634, 462972.0247, 4550648.6564, 462954.1144, 4550707.5047, 462931.0868, 4550776.5875, 462918.2937, 
4550845.6702, 462897.8247, 4550978.7186, 462897.8247, 4551068.2701, 462897.8247, 4551175.7321, 462897.8239, 4551252.4903))

and its draw one polygon

where id = 2 then

ORA_GEOMETRY = MDSYS.SDO_GEOMETRY(2003, 32638, null, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1), MDSYS.SDO_ORDINATE_ARRAY(511185.4848, 4522136.2067, 511182.8401, 4522157.3649, 511174.9057, 4522175.8784, 511153.7474, 
4522183.8128, 511145.8131, 4522204.9710, 511151.1026, 4522228.7741, 511156.3922, 4522265.8010, 511161.6818, 4522318.6967, 511160.8519, 4522347.7646, 511140.5235, 4522337.2102, 511118.7925, 4522328.3526, 
511098.2070, 4522310.7624, 511089.6745, 4522286.2932, 511086.4391, 4522234.5278, 511084.9831, 4522191.7471, 511079.9685, 4522163.3504, 511057.3211, 4522130.9970, 511037.9091, 4522127.7617, 511005.5557, 4522134.2324, 
510957.0257, 4522143.9384, 510934.2304, 4522157.3649, 510898.7896, 4522166.5858, 510859.9656, 4522173.0564, 510831.0838, 4522162.6545, 510799.3465, 4522181.1680, 510772.8986, 4522178.5232, 510759.6747, 4522162.6545, 
510743.8060, 4522152.0754, 510725.2925, 4522152.0754, 510709.4238, 4522146.7858, 510690.9103, 4522146.7858, 510704.0644, 4522097.1338, 510691.7281, 4522059.8196, 510675.0416, 4522011.9018, 510643.3042, 4521966.9405, 
510630.0803, 4521943.1374, 510619.5012, 4521911.4001, 510659.1729, 4521935.2031, 510693.5551000010, 4521956.3614, 510735.8716, 4521969.5853, 510786.1225, 4521982.8092, 510839.0182, 4522003.9675, 510899.8482, 4522030.4153, 
510958.0335, 4522046.2840, 511002.9948, 4522046.2840, 511066.4696, 4522046.2840, 511106.1413, 4522059.5079, 511143.1683, 4522085.9558, 511185.4848, 4522136.2067)) 

And this one's turn will draw one polygon.

I want to combine these two lines into one, so that if I look at it I show two polygons where id = 3

1
  • You've alread got the ordinate array values. You just need to alter the SDO_ELEM_INFO_ARRAY
    – Vince
    Aug 15 '17 at 10:26
1

Use the SDO_AGGR_UNION for that.

insert into new_table (id,ora_geometry)
select 3, sdo_aggr_union(sdoaggrtype(ora_geometry,0.0005))
from new_table
where id in (1,2);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.