[Gdal-dev] creating tiles from rasters using gdal
Frank Warmerdam
warmerdam at pobox.com
Tue May 15 13:53:40 EDT 2007
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
More information about the Gdal-dev
mailing list