[gdal-dev] Resampling a raster with gdalwarp
Giovanni Anconitano
giovanni.anconitano at uniroma1.it
Sat Nov 18 17:15:45 PST 2023
Hello,
I have a question about how to properly set the -tr flag when using
gdalwarp.
In particular, I'm using gdalwarp for resampling a GeoTiff from its
original resolution to a target resolution.
Let's consider, for simplicity, the original pixel size equal to (5m, 5m)
and the target resolution equal to (10m, 10m).
This is the command I use: gdalwarp -tr 10 -10 input.tif output.tif
I'm using a negative <yres> because when I open the GeoTiff file in QGIS,
or if I use gdalinfo, I get a pixel size equal to (5, -5) for the source
raster.
Is it correct to use a negative <yres> with gdalwarp? I also tried -tr 10
10, but the result seems to be the same as the case in which I use -tr 10
-10.
In both cases gdalinfo and QGIS display (10,-10) as the pixel size.
How does gdalwarp treat a negative yres value?
Thank you
Giovanni
--
**Fai crescere le giovani ricercatrici e i giovani ricercatori*
**con il 5
per mille alla Sapienza
*Scrivi il codice fiscale dell'Università
*80209930587
Cinque per mille <https://www.uniroma1.it/it/node/23149>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20231118/a6781042/attachment-0001.htm>
More information about the gdal-dev
mailing list