[gdal-dev] Slow warping
Ari Jolma
ari.jolma at gmail.com
Fri Nov 27 03:58:01 PST 2015
I warped an image for which I estimated a geotransform. I'm wondering
why it took so long (hours).
My source image is a jpeg, lets call it src.jpg. I add the geotransform
as a jpgw-file.
This goes fast:
gdal_translate -of JPEG src.jpg test.jpg
Input file size is 6048, 4032
0...10...20...30...40...50...60...70...80...90...100 - done.
but the result is not warped, there is a test.jpg-aux.xml file, which
contains the original geotransform.
gdalwarp does not do it:
gdalwarp -of JPEG jpg-3067/09410_001.jpg test2.jpg
Output driver `JPEG' not recognised or does not support
direct output file creation.
Using the AutoCreateWarpedVRT in bindings works:
use Geo::GDAL;
my $dataset = Geo::GDAL::Open('src.jpg');
my $warped = Geo::GDAL::AutoCreateWarpedVRT($dataset);
Geo::GDAL::Driver('JPEG')->Copy('tets3.jpg', $warped, 1, undef, sub {my
$prog = shift; say $prog});
but it is really slow.
Does QGIS use AutoCreateWarpedVRT when it does on-the-fly reprojection?
It outputs
Warning: Creating Warped VRT.
to the terminal. And it is fast.
Ari
More information about the gdal-dev
mailing list