<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Doh! Thank you, I will fix that and see what happens. I suspect that solves the problem! Stared at it too long I guess!<br>
<br>
Thanks,<br>
<br>
Derek<br>
<div style="font-family: Times New Roman; color: rgb(0, 0, 0); font-size: 16px;">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF267536"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Chaitanya kumar CH [chaitanya.ch@gmail.com]<br>
<b>Sent:</b> Tuesday, July 19, 2011 11:30 PM<br>
<b>To:</b> Cole, Derek<br>
<b>Cc:</b> gdal-dev@lists.osgeo.org<br>
<b>Subject:</b> Re: [gdal-dev] Unable to write in subdataset<br>
</font><br>
</div>
<div></div>
<div>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">
&lt;<a href="mailto:dcole@integrity-apps.com" target="_blank">dcole@integrity-apps.com</a>&gt;</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&nbsp; is like so:<br>
<br>
char **papszSubdatasets = GDALGetMetadata(sharpenedDS,&quot;SUBDATASETS&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eraserDS = (GDALDataset *) GDALOpenShared(CSLFetchNameValue(papszSubdatasets, &quot;SUBDATASET_2_NAME&quot;) , GA_ReadOnly );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eraserBand = eraserDS-&gt;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 &quot;from&quot; 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" target="_blank">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>
&#43;91-9494447584<br>
17.2416N 80.1426E<br>
</div>
</div>
</div>
</body>
</html>