Re: [gdal-dev] Suggestion for API addition

2012-11-11 Thread Even Rouault
> now it's my turn to be confused. > This is pixel-by-pixel copy of a subset of the input pixels. It is a > subwindow of the original image, exactly as you say. > I'm taking an m x n input image and copying p x q pixels (p <= m, q <=n) > into p x q pixels in the band. The scale is unchanged. Ah i

Re: [gdal-dev] Suggestion for API addition

2012-11-11 Thread David Strip
On 11/11/2012 12:56 PM, Even Rouault wrote: GDALRasterBand::WriteCropToBand(int nCropSizeX, // width of the cropped region int nCropSizeY, // height of the cropped region int nXOffset, // offset to the left edge of the cropped region int nYOffset, // offset to the top of the cropped region vo

Re: [gdal-dev] Suggestion for API addition

2012-11-11 Thread Even Rouault
> GDALRasterBand::WriteCropToBand(int nCropSizeX, // width of the cropped > region int nCropSizeY, // height of the cropped region int nXOffset, // > offset to the left edge of the cropped region int nYOffset, // offset to > the top of the cropped region void * pBuf,// pointer to the buffe

Re: [gdal-dev] Suggestion for API addition

2012-11-11 Thread David Strip
On 11/11/2012 9:25 AM, Even Rouault wrote: The value of a new function is code clarity. It's not just computing pData, it's that the nBufXSize and nBufYSize become the size of the cropped region, not the size of the actual buffer, I don't unders

Re: [gdal-dev] Suggestion for API addition

2012-11-11 Thread Even Rouault
> The value of a new function is code clarity. It's not just computing > pData, it's that the nBufXSize and nBufYSize become the size of the > cropped region, not the size of the actual buffer, I don't understand what you mean, sorry. Perhaps you should show the code. I understand that better th

Re: [gdal-dev] Suggestion for API addition

2012-11-11 Thread David Strip
On 11/11/2012 3:53 AM, Even Rouault wrote: Le dimanche 11 novembre 2012 03:45:57, David Strip a écrit : The current GDALRasterBand::RasterIO signature makes it easy to read or write a contiguous subregion of the band. However, if you want to read or write the entire band into/from a contiguou

Re: [gdal-dev] Suggestion for API addition

2012-11-11 Thread Even Rouault
Le dimanche 11 novembre 2012 03:45:57, David Strip a écrit : > The current GDALRasterBand::RasterIO signature makes it easy to read or > write a contiguous subregion of the band. However, if you want to read or > write the entire band into/from a contiguous sub-region of the buffer, > it's not ne

[gdal-dev] Suggestion for API addition

2012-11-10 Thread David Strip
The current GDALRasterBand::RasterIO signature makes it easy to read or write a contiguous subregion of the band. However, if you want to read or write the entire band into/from  a contiguous sub-region of the buffer, it's not nearly as straightforward. You can do this by