gdal compression and pyramids
NilsOSep 22 2010 — edited Sep 23 2010Hi!
I'm having problems importing raster-data using gdal with compression.
DB-Version: 11.2.0.1.0
gdal-Version: 1.72
gdal-Statement: gdal_translate -of georaster \\Path\file.tif geor:user/pw@server,A_TABLE_GK2,GEORASTER -co compress=DEFLATE -co nbits=1 -co "INSERT=VALUES(100,'file.tif','GK2',SDO_GEOR.INIT('RDT_A_TABLE_GK2'))
The import works fine and the data is loaded into my table. I can validate the file using
1. sdo_geor.validateblockMBR(georaster),
2. SDO_GEOR_UTL.calcRasterStorageSize(georaster),
3. substr(sdo_geor.getPyramidType(georaster),1,10) pyramidType, sdo_geor.getPyramidMaxLevel(georaster) maxLevel
4. SELECT sdo_geor.getCompressionType(georaster) compType,sdo_geor.calcCompressionRatio(georaster) compRatio
5. SELECT sdo_geor.getCellDepth(georaster) CellDepth,substr(sdo_geor.getInterleavingType(georaster),1,8) interleavingType,substr(sdo_geor.getBlockingType(georaster),1,8) blocking
and all results are true (or feasible).
Now my problem:
DECLARE
gr sdo_georaster;
BEGIN
SELECT georaster INTO gr
FROM A_TABLE_GK2 georid = 11 FOR UPDATE;
sdo_geor.generatePyramid(gr, 'resampling=CUBIC');
UPDATE A_TABLE_GK2 SET georaster = gr WHERE georid = 11;
COMMIT;
END;
/
Error report:
ORA-01403: no data found
ORA-06512: at line 4
01403. 00000 - "no data found"
*Cause:
*Action:
The pyramid cannot be calculated. Leaving out the parameter -co compress=DEFLATE allows me to generate pyramids (though this results in an exploding tablespace as 2GB data in file-system rise to about 120 GB in database without compression - and 2GB is only a small amount of the data needed).
I already recognized gdal needs the Parameter -co compress=DEFLATE in Upper-Case to allow validation of georaster - but this doesn't change my problems calculating pyramids.
Anybody heaving an idea?
NilsO