Re: [gdal-dev] GDAL Tiling

2012-03-29 Thread Even Rouault
Selon akshay gupta : > I am presently using -srcwin for copying AOI to a different file. does > -projwin have any advantage over -srcwin? No, the underlying processing is the same. You just use what option is the more convenient for you. In fact, when -projwin is used, the projected/geographic co

Re: [gdal-dev] GDAL Tiling

2012-03-29 Thread akshay gupta
I am presently using -srcwin for copying AOI to a different file. does -projwin have any advantage over -srcwin? Akhy On Wed, Mar 28, 2012 at 5:29 PM, Jay L. wrote: > Akshay, > > 1) An AOI can be created using the -projwin option in gdal_translate. You > can use that option when creating a new

Re: [gdal-dev] GDAL Tiling

2012-03-28 Thread Jay L.
Akshay, 1) An AOI can be created using the -projwin option in gdal_translate. You can use that option when creating a new raster with a new tiles size. 2) Using the Python bindings it is possible to read a segment of a raster into memory without allocating memory. I am unsure using another othe

Re: [gdal-dev] GDAL Tiling

2012-03-28 Thread Mateusz Loskot
On 28 March 2012 07:45, akshay gupta wrote: > 2) When I read an image through ReadBlock() i had to allocate some memory > and pass it in the function. Is there some way that i get the image data > stored in GDALRasterBlock directly without passing my own allocated memory. http://www.gdal.org/clas

Re: [gdal-dev] GDAL Tiling

2012-03-27 Thread akshay gupta
Thanks Jay and Chaitanya, your comments helped a lot. I have few more doubts, these may be trivial but since i am new to GDAL i want to confirm. 1) Is it possible to cut a portion(AOI) of image in any format and store it as tiled GTiff. Cos i want to create multiple copied of image data as i keep

Re: [gdal-dev] GDAL Tiling

2012-03-27 Thread Jay L.
For a geotiff I would use the following to change block size. gdal_translate -of GTiff -co "TILED=YES" -co "BLOCKXSIZE=256" -co "BLOCKYSIZE=256" Replace 256with whatever integer you want. I realize that this is outside of your program, but it looks like you are going to need to modify the inp

Re: [gdal-dev] GDAL Tiling

2012-03-27 Thread Chaitanya kumar CH
Akhy, Block size is determined/set at the time of file creation. The only way to change it is to make a different file with the desired block size. Not all raster formats support setting custom block sizes. GeoTIFF does. On Tue, Mar 27, 2012 at 11:05 PM, akshay gupta wrote: > > Thanks for your q

Re: [gdal-dev] GDAL Tiling

2012-03-27 Thread akshay gupta
Thanks for your quick reply, I dont want to use GDALRasterIO, I dont want to allocate memory of size equal that of image or ROI, i want to make use of tiling as much as possible. Can you provide more detail on how to create tiles tiff files by default. Akhy On Tue, Mar 27, 2012 at 9:30 PM, Chaitan

Re: [gdal-dev] GDAL Tiling

2012-03-27 Thread Chaitanya kumar CH
Akhy, 1) Raster block size is a readonly property. The only way to change it is to create a new dataset with the new block size. For a tiff image you can use the creation options TILED, BLOCKXSIZE and BLOCKYSIZE [1]. 2) You can read the raster any way you want using the GDALRasterIO() and GDALData

[gdal-dev] GDAL Tiling

2012-03-27 Thread akshay gupta
Hi, I have few questions regarding GDAL tiling and overviews. 1) Is there any In build direct function in GDAL from where i can set the size of the tiles(raster block size). 2)I an facing an strange situation. I have an TIFF image, and I am trying to read it block by block using ReadBlock(). When