My problem is similar to this: Replicating result of gdalwarp using gdal Python bindings. I want to resample a raster using bilinear interpolation, which I've done successfully with gdalwarp by adding height and width specifications for the output file:
gdalwarp -ts w_output h_output -r bilinear -co 'TFW=YES' -of VRT input.tif output.vrt
I'm trying to replicate the above result using the Python API. Can it be done using gdal.AutoCreateWarpedVRT?
src_ds = gdal.Open(input.tif) src_wkt = None dst_wkt = ???? resampling = gdal.GRA_Bilinear output_vrt = gdal.AutoCreateWarpedVRT(src_ds, src_wkt, dst_wkt, resampling)
I'm guessing I have to do something clever with the dst_wkt in order to replicate the above gdalwarp result. I just want to increase the number of pixels by a factor of 10 compared to the input raster.
P.S. If it's better to just use gdalwarp, that's good to know. I have no problem doing that.