[gdal-dev] Writing data to "CreateCopy" files

Cole, Derek dcole at integrity-apps.com
Fri Jul 15 18:57:41 EDT 2011


I have a couple of questions regarding this.

Is the dataset that is returned from CreateCopy able to be used immediately? I would like to use it to get the first band from it, and use RasterIO on that band.

Secondly - the data I am trying to write with RasterIO is unsigned char, but when I was reading the data, I had to read it with a GDT_Float32, which was allocated like so:

    float * floatData = (float *) CPLMalloc(sizeof(float)*bufSizeX*bufSizeY);

and that seemed to be working well. Will my copy have to be written via a GDT_Float32 data buffer like the one I read it into initially, or can I just change the RasterIO parameter on the write to be GDT_Byte?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110715/1943bd81/attachment.html


More information about the gdal-dev mailing list