[gdal-dev] raster resize

Even Rouault even.rouault at mines-paris.org
Fri Oct 15 04:49:25 EDT 2010


Selon Giacomo Piva <piva at meeo.it>:

Giacomo,

gdal_translate doesn't do the hard work itself and lets other part of GDAL do
it. To be more precise, the resizing of the raster in the context of
gdal_translate is done through the VRT driver (frmts/vrt/vrtsources.cpp). But if
you want to do it yourself with GDAL API, the best is to use the GDALRasterIO()
function directly by specifying dimensions of output buffer that are different
than the dimensions of the source window (this will do nearest neighbour
resampling).


>   Hi all,
> I would like to resize the dimension of a raster like the gdal_translate
> tool with "-outsize" option.
> I took a look into the gdal_translate.cpp source file but I didn't
> understand how it works, I can't find the resize operation lines.
> Does someone can help me to understand it?
>
> Thank you.
>
> --
> Giacomo
>
> _______________________________________________
> 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