I am trying to call gdal_retile
from my Python code like this:
import gdal_retile
and in main:
gdal_retile.main("-v -r bilinear -levels 4 -ps 2048 2048 -co \"tiled=YES\" -targetDir pyramid --optfile files.txt")
but I get this error in my Debug Probe window:
Unrecognised command option: -
Usage: gdal_retile.py
[-v] [-co NAME=VALUE]* [-of out_format]
[-ps pixelWidth pixelHeight]
[-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/
CInt16/CInt32/CFloat32/CFloat64}]
[ -tileIndex tileIndexName [-tileIndexField fieldName]]
[ -csv fileName [-csvDelim delimiter]]
[-s_srs srs_def] [-pyramidOnly] -levels numberoflevels
[-r {near/bilinear/cubic/cubicspline/lanczos}]
[-useDirForEachRow]
-targetDir TileDirectory input_files
Any idea what I am doing wrong?
--optfile
setting? I've seen a number of threads describing issues with_retile
and--optfile
.gdal_retile
instruction in a terminal does it behave the same way? That is, running this in a cmd:gdal_retile.py -v -r bilinear -levels 4 -ps 2048 2048 -co "tiled=YES" -targetDir pyramid --optfile files.txt