The problem: I need to export imagery from a WMTS or XYZ webtile source for a variety of geographically dispersed areas. It will be used in Qfield, so needs to exported as a geopackage raster.
In QGIS, there is an option to use GDALs translate to convert to Geopackage. Is there a way to set a geographic extent and output resolution?
There is also the option, via the right-click menu or the layer menu, to 'save as' the image to geopackage (with a set extent and resolution). Is there a way to invoke this command via python?
-tr
and-projwin
gdal.org/programs/gdal_translate.html.