[gdal-dev] How to improve gdal_rasterize perfomance?

Frank Warmerdam warmerdam at pobox.com
Wed Sep 16 09:42:50 EDT 2009


Hermann Peifer wrote:
> Hi,
> 
> Are there any hints from the experts about how to improve gdal_rasterize 
> perfomance?
> 
> My specific case is to rasterize a 1+GB shapefile into a 26800 x 23200 
> GeoTiff. Are there some memory settings or GeoTiff creation options that 
> could speed up the rasterization?

Hermann,

This sounds like a heap of processing that needs to be done.

You can increase the chunk size on which gdal_rasterize operates by
increasing the GDAL_CACHEMAX config option.  I would suggest sizing
it to be roughly 1/3 of your machine RAM.

eg.

gdal_rasterize --config GDAL_CACHEMAX 600 ...

would be appropriate on a machine with 2GB of RAM.

Beyond that I can't think of much that might help.  The above basically
reduces the number of passes needed through the vector data.  It is all
processed once for each chunk of the raster that is processed.

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    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list