Ramesh,<br><br>Instead of &#39;pasting&#39; a part of your code, could you attach your entire .cpp file along with the main() function and stuff?<br><br><div class="gmail_quote">On Tue, Feb 22, 2011 at 9:49 AM, user gdal <span dir="ltr">&lt;<a href="mailto:userofgdal@gmail.com">userofgdal@gmail.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;">Dear Sir,<br>
Thanks a lot for reply about zero pixel values when I attempted to<br>
write into an output image file. Though I pasted the code I wrote for<br>
programmatically &#39;copying&#39; the image, once again I am pasting the same<br>
below.<br>
<br>
Q. &quot;One thing I notice about your code is that you only appear to read<br>
and write the first scanline of the image.  Is this intentional?&quot;<br>
<br>
Ans. No. I want to copy the whole image. Please see the function<br>
ReadNWrite(...). Am I reading only the first scanline? Oh my God! In<br>
the syntax of the function RasterIO of GDALDataset, it seems there is<br>
no parameter with scanline number. Can you please solve the problem<br>
for me. Before call of the function ReadNWrite, I wanted to &#39;prepare&#39;<br>
the output image (see the function CreateOutputImg). The problem<br>
should be in the functions CreateOutputImg, ReadNWrite, Read and<br>
Write.<br>
<br>
Another worry is projection information, which I wanted to put in<br>
CreateOutputImg. I am sure there are some serious shortcomings in my<br>
attempt. How to set that correctly?<br>
<br>
Q. &quot;For the purposes of asking a question of the list it would be helpful if<br>
you could boil your program down to a minimum example including all the<br>
essentials.  It will require extra work on your part, but will make it<br>
much easier for the many members of the list who might want to skim<br>
through the code to see if they have suggestions&quot;.<br>
<br>
Ans. I have made some more effort to make my difficulty more specific.<br>
Now I request all of you to kindly solve it and if possible, post in<br>
the website.<br>
<br>
Thanks once again.<br>
<br>
Yours sincerely,<br>
 Ramesh<br>
<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
The class&#39;s destructor closes the output dataset (&quot;outds&quot;) using GDALClose.<br>
<br>
Ramesh<br>
-------------------------------------------------------------------------------------------------------------------------<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>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>