<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="Times New Roman, Times, serif">Hi Knut,<br>
<br>
What do you mean by "very slow"? I regularly use gdalwarp -tps on
much larger rasters with a few thousand gcp-s, and never noticed
unacceptable delays. Do you have very little physical memory, or
many parallel processes running?<br>
<br>
Jan<br>
<br>
</font>
<div class="moz-cite-prefix">On 12/12/2012 01:12 PM, Knut-Frode
Dagestad wrote:<br>
</div>
<blockquote cite="mid:ka9sc3$dil$1@ger.gmane.org" type="cite">Hi
list,
<br>
<br>
When warping images with many GCPs, the -tps switch (Thin Plate
Spline) is found to be necessary to get decent accuracy. This
makes however warping very slow. The only method I found to
increase speed is the -et switch, but at cost of spatial accuracy.
<br>
<br>
<br>
Below some comments about the other tries which did not help:
<br>
<br>
- compiling GDAL with armadillo support had no effect on speed.
<br>
Btw, to compile with armadillo I had to manually insert -llapack
in the following line in configure:
<br>
if test -z "`${CXX} testarmadillo.cpp -o testarmadillo -larmadillo
2>&1`" ; then .....
<br>
Perhaps ${LIBS} should be added permanently to this line in trunk?
<br>
<br>
- compiling GDAL with OpenCL had also no effect. At first
surprising, but looking at the opencl warp kernel it seems that it
only makes a difference for other resampling algorithms than
nearest neighbour?
<br>
<br>
- Increasing memory with -wm had no effect
<br>
<br>
- Using several threads (-multi -wo NUM_THREADS=ALL_CPUS) actually
increased computing time significantly (my proj version is 4.7.1).
<br>
<br>
From the debug output, a lot of the time is apparently spent on:
<br>
"WARP: Copying metadata from first source to destination dataset"
<br>
Is this an indication that much time is simply spent on reading
and writing the GCPs to/from file? If so, we could perhaps expect
improved performance if Geolocation Arrays could be used instead
(not possible due to <a class="moz-txt-link-freetext" href="http://trac.osgeo.org/gdal/ticket/4907">http://trac.osgeo.org/gdal/ticket/4907</a>).
<br>
<br>
<br>
The tests are made with the following file and command on Ubuntu:
<br>
<a class="moz-txt-link-freetext" href="http://dl.dropbox.com/u/15885758/testgcp.tif">http://dl.dropbox.com/u/15885758/testgcp.tif</a> (3212 GCPs and
2048x2511 pixels covering Southern Europe)
<br>
<br>
time gdalwarp --debug on -et 5 -tps -t_srs '+proj=merc'
testgcp.tif out.tif (+ other swithces mentioned above)
<br>
<br>
<br>
Best regards from Knut-Frode
<br>
<br>
_______________________________________________
<br>
gdal-dev mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
<br>
</blockquote>
<br>
</body>
</html>