Splitting/tiling a raster

Paul Spencer pspencer at DMSOLUTIONS.CA
Tue Jul 12 08:14:30 EDT 2005


You can also add internal tiles to a TIFF image and, if you are 
accessing the TIFF via GDAL, it will use the tiles to optimize access to 
the raster data without having to split it into multiple files.

I believe you do this using gdal_translate with some options like:

-co "TILED=YES"

You can also fine tune the internal tile size (default is 256x256):

-co "BLOCKXSIZE=256" -co "BLOCKYSIZE=256"

then run gdaladdo to produce a tiled geotiff file with overviews.

Cheers

Paul

Bart van den Eijnden wrote:
> You can build overviews with gdaladdo:
> 
> http://www.gdal.org/gdal_utilities.html#gdaladdo
> 
> Eg:
> 
> gdaladdo -r average abc.tif 2 4 8 16
> 
> Try that first I would say.
> 
> Best regards,
> Bart
> 
> Bart van den Eijnden
> Syncera IT Solutions
> Postbus 270
> 2600 AG  DELFT
> 
> tel.nr.: 015-7512436
> email: BEN at Syncera-ITSolutions.nl
> 
> 
>>>>Stefan Schwarzer <stefan.schwarzer at GRID.UNEP.CH> 07/12/05 12:02pm >>>
> 
> 
>>Which format is your raster currently in?
> 
> 
> TIF or JPEG
> 
> 
>>If it is performance, building overviews could also help for  
>>certain situations.
> 
> 
> So, how can I build overviews then?
> 
> 
>>At which scales do you display your raster? Also at full extent?
> 
> 
>  From full extent (at the beginning - a couple of hundreds km wide)  
> to then, when zooming, a couple of km wide.
> 
> 
>>Best regards,
>>Bart
>>
>>Bart van den Eijnden
>>Syncera IT Solutions
>>Postbus 270
>>2600 AG  DELFT
>>
>>tel.nr.: 015-7512436
>>email: BEN at Syncera-ITSolutions.nl 
>>
>>
>>
>>>>>Stefan Schwarzer <stefan.schwarzer at GRID.UNEP.CH> 07/12/05  
>>>>>11:55am >>>
>>>>>
>>Thanks Bart for the quick response,
>>
>>aehh, yes, performance. But perhaps there is no need to split it up?
>>Is it that what you mean? Gush, somehow I don't really get it how
>>this tiling works, stupid me....
>>
>>Stef
>>
>>
>>
>>
>>>Hi Stefan,
>>>
>>>since gdal_translate has the option to select a subwindow (srcwin)
>>>from your sourcefile, you can use it to split your raster file into
>>>subimages.
>>>
>>>http://www.gdal.org/gdal_utilities.html#gdal_translate 
>>>
>>>After that, you do use gdaltindex to create a tileindex. That part
>>>is described in the raster howto:
>>>
>>>http://mapserver.gis.umn.edu/doc44/raster-howto.html 
>>>
>>>Btw, what is the exact reason you want to split up your raster?
>>>Performance?
>>>
>>>Best regards,
>>>Bart
>>>
>>>Bart van den Eijnden
>>>Syncera IT Solutions
>>>Postbus 270
>>>2600 AG  DELFT
>>>
>>>tel.nr.: 015-7512436
>>>email: BEN at Syncera-ITSolutions.nl 
>>>
>>>
>>>
>>>
>>>>>>Stefan Schwarzer <stefan.schwarzer at GRID.UNEP.CH> 07/12/05
>>>>>>11:39am >>>
>>>>>>
>>>>>>
>>>Hi,
>>>
>>>this subject is really not new. But I haven't found any real how-to
>>>for the whole story. Perhaps somebody could clarify the steps needed.
>>>when starting with an image of some larger size and when ending with
>>>a tiled raster. Cause I guess that' what has to be done.
>>>- At least I have now one single big raster. As far as I understood I
>>>need to split the big image into smaller ones. But how?
>>>- And then I can use gdaltindex to build the shapefile to define the
>>>tiles. Right?
>>>
>>>Thanks for clarification.
>>>
>>>
>>
>>
> 
> 

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+



More information about the mapserver-users mailing list