[gdal-dev] Zero Pixel Values. Continuation...

Chaitanya kumar CH chaitanya.ch at gmail.com
Tue Feb 22 00:03:02 EST 2011


Ramesh,

Instead of 'pasting' a part of your code, could you attach your entire .cpp
file along with the main() function and stuff?

On Tue, Feb 22, 2011 at 9:49 AM, user gdal <userofgdal at gmail.com> wrote:

> Dear Sir,
> Thanks a lot for reply about zero pixel values when I attempted to
> write into an output image file. Though I pasted the code I wrote for
> programmatically 'copying' the image, once again I am pasting the same
> below.
>
> Q. "One thing I notice about your code is that you only appear to read
> and write the first scanline of the image.  Is this intentional?"
>
> Ans. No. I want to copy the whole image. Please see the function
> ReadNWrite(...). Am I reading only the first scanline? Oh my God! In
> the syntax of the function RasterIO of GDALDataset, it seems there is
> no parameter with scanline number. Can you please solve the problem
> for me. Before call of the function ReadNWrite, I wanted to 'prepare'
> the output image (see the function CreateOutputImg). The problem
> should be in the functions CreateOutputImg, ReadNWrite, Read and
> Write.
>
> Another worry is projection information, which I wanted to put in
> CreateOutputImg. I am sure there are some serious shortcomings in my
> attempt. How to set that correctly?
>
> Q. "For the purposes of asking a question of the list it would be helpful
> if
> you could boil your program down to a minimum example including all the
> essentials.  It will require extra work on your part, but will make it
> much easier for the many members of the list who might want to skim
> through the code to see if they have suggestions".
>
> Ans. I have made some more effort to make my difficulty more specific.
> Now I request all of you to kindly solve it and if possible, post in
> the website.
>
> Thanks once again.
>
> Yours sincerely,
>  Ramesh
>
>

>
> The class's destructor closes the output dataset ("outds") using GDALClose.
>
> Ramesh
>
> -------------------------------------------------------------------------------------------------------------------------
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110222/39968ef7/attachment-0001.html


More information about the gdal-dev mailing list