Selon Giacomo Piva <p...@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@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>


_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to