[gdal-dev] Unable to write in subdataset

Cole, Derek dcole at integrity-apps.com
Tue Jul 19 18:55:37 EDT 2011


Hello,

I have created an image with multiple subdatasets so that I may store two images in my NITF. the way I am getting the data set of the second image  is like so:

char **papszSubdatasets = GDALGetMetadata(sharpenedDS,"SUBDATASETS");
         eraserDS = (GDALDataset *) GDALOpenShared(CSLFetchNameValue(papszSubdatasets, "SUBDATASET_2_NAME") , GA_ReadOnly );
         eraserBand = eraserDS->GetRasterBand(1);

(this is after checking to make sure that the first DS has more than one subdataset)

According to CPL_DEBUG, the GDALOpenShared works correctly and opens the file as NITF.

However, at some points in my code, I am getting this thrown to console presumably where I am using the band's RasterIO method to GF_Write.

ERROR 3: Unable to write 2097152 byte block from 8302649793.
ERROR 1: An error occured while writing a dirty block

What do these error messages mean? I mam getting a ton of them. the block is the same number of bytes, but the "from" changes in each instance of the error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110719/18041269/attachment.html


More information about the gdal-dev mailing list