[gdal-dev] GDAL Tiling

akshay gupta akshaygupta202 at gmail.com
Wed Mar 28 02:45:09 EDT 2012


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 editing them with different enhancements. and i want all the copies to
be readily accessible in the  form of tiles so that ram don't fill up too
much.

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.
Cos with this I would not have to write the buffer back using the
WriteBlock(), and  I can direclty change the block data improving the
memory utilization.

Thanks again,
Akhy Hückelheim

On Wed, Mar 28, 2012 at 12:20 AM, Jay L. <jzl5325 at psu.edu> wrote:

> 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" <input> <output>
>
> 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 input data pre-processing.
>
>
> Jay
>
>
>
> On Tue, Mar 27, 2012 at 11:14 AM, akshay gupta <akshaygupta202 at gmail.com>wrote:
>
>>  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 i read block from the
>> band of the original dataset(GDALDataset I get when i call GDALOpen() ), I
>> get a tile which is of size Width X 1 but if i create overviews and then
>> call ReadBlock() on the band extracted from the first overview i get square
>> tiles(Blocks). Can any body tell me why is this happening, Is there any way
>> of getting square tiles of same size irrespective of whether i call
>> ReadBlock() on original Dataset or on the overview level.
>>
>> Thanks and regards,
>> Akhy Hückelheim
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120328/8acc7045/attachment-0001.html


More information about the gdal-dev mailing list