Derek,<br><br>Why are you trying to write to the dataset after opening it as GA_ReadOnly?<br><br><div class="gmail_quote">On Wed, Jul 20, 2011 at 4:25 AM, Cole, Derek <span dir="ltr"><<a href="mailto:dcole@integrity-apps.com">dcole@integrity-apps.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt;">Hello,<br>
<br>
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:<br>
<br>
char **papszSubdatasets = GDALGetMetadata(sharpenedDS,"SUBDATASETS");<br>
eraserDS = (GDALDataset *) GDALOpenShared(CSLFetchNameValue(papszSubdatasets, "SUBDATASET_2_NAME") , GA_ReadOnly );<br>
eraserBand = eraserDS->GetRasterBand(1);<br>
<br>
(this is after checking to make sure that the first DS has more than one subdataset)<br>
<br>
According to CPL_DEBUG, the GDALOpenShared works correctly and opens the file as NITF.<br>
<br>
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.<br>
<br>
ERROR 3: Unable to write 2097152 byte block from 8302649793.<br>
ERROR 1: An error occured while writing a dirty block<br>
<br>
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.<br>
</div>
</div>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
<br>+91-9494447584<br>17.2416N 80.1426E<br>