<div dir="auto"><div>in short, warp will give you exactly the target extent of a (possibly) new grid specification in that -te subdivided by the -ts.</div><div dir="auto"><br></div><div dir="auto">translate will give you approximately the extent provided to projwin, but snapped to the source grid alignment at a particular zoom implied by the projwin subdivided by the outsize.</div><div dir="auto"><br></div><div dir="auto">Further, translate can do scaling but warp cannot, which I guess is why you have a vrt in the workflow - you can scale a source virtually with translate to vrt, then warp (or translate) that.</div><div dir="auto"><br></div><div dir="auto">(Finally it's a bit sloppy to have such arbitrary extent values that warp will preserve and I routinely snap them to the source alignment, and I'm interested to provide such a feature in the warper options too.)</div><div dir="auto"><br></div><div dir="auto">Hope that helps!</div><div dir="auto"><br></div><div dir="auto"><br><div dir="auto"><br></div><div dir="auto"><br></div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Fri, 6 Jan 2023, 03:16 Daniel Mannarino, <<a href="mailto:daniel.mannarino@gmail.com">daniel.mannarino@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Hi folks!</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"> </p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">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?).</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">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:</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"> </p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">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</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"> </p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">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</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"> </p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Thank you!</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Daniel Mannarino</p></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div></div></div>