Re: [gdal-dev] GDALCopyWords question

2014-04-03 Thread Even Rouault
Jo, > The pixel offset values are more like stride values than > offsets, to my mind anyway. Thanks for confirming the behaviour. They are stride values indeed. I've just fixed the parameter name and documentation to make that clear. Even -- Geospatial professional services http://even.rouaul

Re: [gdal-dev] GDALCopyWords question

2014-04-03 Thread Jo Meder
Hi Even, On 3/04/2014, at 7:24 AM, Even Rouault wrote: > you could use GDALRasterIO() that would do the conversion for you. I was using that but changed to ReadBlock() to read files by blocks. It looks like I could use GDALRasterIO() for that but it seems a bit less straightforward. > I think

Re: [gdal-dev] GDALCopyWords question

2014-04-02 Thread Even Rouault
Jo, you could use GDALRasterIO() that would do the conversion for you. I think the error in your call to GDALCopyWords() is srcPixelIndex. This parameter is supposed to be the number of bytes between 2 values of the source buffer, but not the offset of the first value. So you should likely use

[gdal-dev] GDALCopyWords question

2014-04-01 Thread Jo Meder
Hi, I'm not getting the results I'm expecting using GDALCopy Words() and I was wondering if someone might have some insight into where I'm going wrong. I'm reading data from a raster block by block. I read the block data into an array. I'm calling GDALCopyWords() like this: GDALCopyWords( srcB