[gdal-dev] Re: gdal_retile.py -r mode ?

Christian Müller christian.mueller at nvoe.at
Fri Feb 27 07:00:38 EST 2009

The error is correct. A look at the man page shows 

gdal_retile.py [-v] [-co NAME=VALUE]* [-of out_format] [-ps pixelWidth 
              [-ot  {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/
              [ -tileIndex tileIndexName [-tileIndexField 
              [ -csv fileName [-csvDelim delimiter]]
              [-s_srs srs_def]  [-pyramidOnly]
              [-r {near/bilinear/cubic/cubicspline}]
              -levels numberoflevels
              -targetDir TileDirectory input_files 

which means that -r determines the resampling method, which could be 


and has nothing to do with the data size. At the moment, I have not 
implemented a parameter to change the color model (perhaps I should). 

Anyway, there are other possibilities to achieve this. (rgp2pct.py as an 

If you have many tiles, the best idea is to write a little script. If you 
are working on a linux box I could assist you. 

If you have many,many tiles, use the --optFile option  described here.

If you have problems, send me a mail 



acangi writes: 

> Hello, 
> Trying to execute this command :
> gdal_retile.py -targetDir pyramid -levels 4 -v -pyramidOnly -s_srs
> top50r.prj -ps 4000 4000 -r mode -co "TILED=YES" -co "INTERLEAVE=PIXEL" -co
> "COMPRESS=LZW" -tileIndex pyramid -tileIndexField location *map.tif 
> gives the error "Unknown resampling method : mode", although it works fine
> in gdaladdo. 
> It's gdal 1.6.0 --with-python. The data is colormapped, therefor I want to
> use mode. I don't want to convert it to RGB first because of the size of the
> data and I'm not the only one using it. 
> Shouldn't the "-r mode" option work in gdal_retile ?
> -- 
> View this message in context: http://n2.nabble.com/gdal_retile.py--r-mode---tp2394924p2394924.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com. 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

More information about the gdal-dev mailing list