user13317
user13317

Reputation: 505

Populating a Large Array

I want to load a polygon into Oracle Spatial, but am running into a problem. The polygon is very intricate and contains a lot of coordinates, but I run into issues when trying to populate the SDO_ORDINATE_ARRAY directly. So I tried to solve this problem by first filling in an array that I could then pass to SDO_ORDINATE_ARRAY. However, I run out of shared memory b/c the array is too big. Any ideas of how to circumvent this problem.

DECLARE
ORD SDO_ORDINATE_ARRAY := SDO_ORDINATE_ARRAY();
TYPE ARRAY_T IS TABLE OF VARCHAR2(32);
ARRAY ARRAY_T := ARRAY_T(
    Lots and Lots of Coordinates....
);
BEGIN
    FOR I IN 1..ARRAY.COUNT LOOP
        ORD.EXTEND;
        ORD(i) := ARRAY(i);
END LOOP;
END;

Upvotes: 0

Views: 95

Answers (1)

MiGro
MiGro

Reputation: 1511

Create temporary table http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables003.htm#ADMIN11633 Insert data and then use SQL in order to achieve expected results.

Upvotes: 1

Related Questions