[Gdal-dev] creating tiles from rasters using gdal

Paul Spencer pagameba at gmail.com
Tue May 22 21:18:29 EDT 2007


Thanks Frank.  One of the images that I tried was a tiff but I think  
it must have been the PNGs that were poor.  When Assefa tried it by  
converting to a tiled tiff first, performance was substantially better.

Cheers
Paul

On 15-May-07, at 1:53 PM, Frank Warmerdam wrote:

> Paul Spencer wrote:
>> I need to turn some rasters (png and tiff) into tiles for use in a  
>> tiled map application.  For various reasons, these rasters are not  
>> georeferenced and I don't need them to be.
> ...
>> This works perfectly but becomes increasingly slow - I'm  
>> processing 6804 tiles out of a raster that is 21504 x 20736  
>> pixels, the first 100 or so were fast but now it is down to 3-4  
>> secs per tile (I'm at 4200 tiles so far).
>> How can I improve performance?  Is there an existing utility that  
>> will do something like this or do I need to roll my own version of  
>> gdal_translate?
>
> Paul,
>
> If the source raster is PNG then the problem is likely due to the file
> having to be decompressed from the beginning each time you process  
> a tile.
> For the first row of tiles this isn't bad, but the further you go  
> down the
> big file, the more of the png has to be decompressed on each run.
>
> If you can, just reprocess the big images into internally tiled  
> TIFFs once
> before running the tiling script.
>
> Alternatively, you could accomplish the tiling using a script that  
> keeps the
> input file open.  This would help because the in memory caching  
> would prefer
> a lot of unnecessary re-decompressing.
>
> Best regards,
> -- 
> --------------------------------------- 
> +--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,  
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | President OSGeo, http:// 
> osgeo.org
>

+-----------------------------------------------------------------+
|Paul Spencer                          pspencer at dmsolutions.ca    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+








More information about the Gdal-dev mailing list