[gdal-dev] gdalwarp vs gdal_translate for scaling
Daniel Mannarino
daniel.mannarino at gmail.com
Thu Jan 5 08:16:18 PST 2023
Hi folks!
We have a process that generates web mercator zoom levels by resampling
from the next higher up, from the original resolution down to zoom level 0.
Currently we do so with gdalwarp, but a team member realized that
gdal_translate is capable of the same, and at first glance is much faster.
Unfortunately, using the two commands (below) which I intended to do
exactly the same thing winds up with slightly different results (can/should
I post a small image here to illustrate?).
I won't ask "Which is correct?" because the answer is almost certainly
"That depends on what you want". But can someone help me understand the
difference between what is done with the gdalwarp command versus the
gdal_translate one so that I can decide if using gdal_translate is an
acceptable solution? Here are the two commands:
gdalwarp -te 12523442.714243278 0.0 15028131.257091936 2504688.5428798534
-ts 65536 65536 -r mode -co TILED=YES ../source_tiles/everything.vrt
007R_013C_warp_mode.tif
gdal_translate -r mode -projwin 12523442.714243278 2504688.5428798534
15028131.257091936 0.0 -outsize 65536 65536 -co TILED=YES
../source_tiles/everything.vrt 007R_013C_translate_mode.tif
Thank you!
Daniel Mannarino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230105/0cebe32f/attachment.htm>
More information about the gdal-dev
mailing list