CALL sdo_geor_utl.createDMLTrigger('RASTER', 'IMAGE');
CREATE TABLE RASTER_RDT OF SDO_RASTER
(PRIMARY KEY (rasterID, pyramidLevel, bandBlockNumber,
rowBlockNumber, columnBlockNumber))
LOB(rasterBlock) STORE AS rdt_1_rbseg
(
CHUNK 8192
CACHE READS
NOLOGGING
PCTVERSION 0
STORAGE (PCTINCREASE
);
INSERT INTO RASTER VALUES ('oek', sdo_geor.init('RASTER_RDT'));
DECLARE
geor SDO_GEORASTER;
BEGIN
-- Import the TIFF image and world file
SELECT IMAGE INTO geor from RASTER
where NAME = 'oek' FOR UPDATE;
sdo_geor.importFrom(geor, NULL, 'TIFF', 'file',
'/georaster/data/oek.tif',
'WORLDFILE','FILE','/georaster/data/oek.wld');
UPDATE RASTER SET IMAGE= geor where NAME = 'oek';
COMMIT;
END;
DECLARE
gr mdsys.sdo_georaster;
BEGIN
select IMAGE into gr from RASTER
where NAME = 'oek' for update;
sdo_geor.generatePyramid(gr, 'rLevel=2 resampling=NN');
update RASTER set IMAGE = gr where NAME='oek';
COMMIT;
END;