[gdal-dev] Warp with non-square pixels in C++
Javier Jimenez Shaw
j1 at jimenezshaw.com
Sun Feb 11 04:09:31 PST 2024
The origin of this question is this ticket in QGIS:
https://github.com/qgis/QGIS/issues/56288
The summary is that with rasters ordered bottom-up, QGIS is doing a Warped
VRT. But Warp us using square pixels... that is distorting too much the
image in some cases (and I would say it is more expensive, but that is not
the problem).
I know, looking at gdalwarp, that the warp can be done with different pixel
size for X and Y.
for instance, with this command:
gdalwarp -tr 0.2 0.1 bottom-up.xyz warped.xyz
I want to provide the pixel size of the original image. And I could use
"GDALWarpAppOptions" dfXRes and dfYRes for that.
However in the code in QGIS (mentioned in the ticket)
https://github.com/qgis/QGIS/blob/3a18496f7c25a00cb26cb5abe0e53b2a13b3de68/src/core/providers/gdal/qgsgdalprovider.cpp#L3590
I only have access to "GDALWarpOptions" (see that there is no "App" in the
name).
I don't see how to provide that data to "GDALAutoCreateWarpedVRT".
Any idea?
Thanks.
Javier
.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ... .... ._ .__
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240211/84fdc3c2/attachment.htm>
More information about the gdal-dev
mailing list