[gdal-dev] FW: Kakadu Jpeg2000 driver

Livneh Yehiyam yehil at rafael.co.il
Wed Nov 2 10:21:59 EDT 2011


One more thing: I used the sample c# app GDALReadDirect.cs to test it.

From: Livneh Yehiyam
Sent: Wednesday, November 02, 2011 3:42 PM
To: gdal-dev
Subject: Kakadu Jpeg2000 driver

Hi
I'm trying to use the Kakadu Jpeg2000 (JP2KAK) driver to read raster data.
I'm working on windows7 64 bit with gdal source version 1.8.1

I've compiled the Kakadu SDK version v6.0 (v6_0-00828N), and compiled Gdal with the driver enabled. I'm using the c# binding.

I can open the dataset, and everything looks ok (size, number of overviews, band count etc.).
When I read data from one of the bands at the base resolution (lets say it is 512x512) I get the correct data.
Band mainBand = dataset.GetRasterBand(1);
mainBand.ReadRaster(0,0,512,512,buffer,512,512,DataType.GDT_Byte,4,2048);

If I get one of the overview bands:
Band overviewBand = mainBand.GetOverview(0);

And I try to read the entire band (lets say it is 256x256):
overviewBand.ReadRaster(0,0,256,256,buffer,256,256,DataType.GDT_Byte,4,1024);
What I get in the buffer are the first 256x256 pixels of the mainBand.
This is contrary to the behavior I'm used to get when reading GTiff files, or even JPEG2000 with the JP2ECW driver.

Is this behavior by design, or is there another way to achieve what I want.

Thanks
Yehiyam

**********************************************************************************************
This message (including any attachments) issued by RAFAEL- ADVANCED DEFENSE SYSTEMS LTD. 
(hereinafter "RAFAEL") contains confidential information intended for a specific individual and purpose, may 
constitute information that is privileged or confidential or otherwise protected from disclosure. If you are not 
the intended recipient, you should contact us immediately and thereafter delete this message from your 
system. You are hereby notified that any disclosure, copying, dissemination, distribution or forwarding of this 
message, or the taking of any action based on it, is strictly prohibited. If you have received this e-mail in error, 
please notify us immediately by e-mail mailto:lawraf at rafael.co.il and completely delete or destroy any and all 
electronic or other copies of the original message and any attachments thereof.
**********************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20111102/5e783b1c/attachment-0001.html


More information about the gdal-dev mailing list