[gdal-dev] gdalwarp with the -tps option -performance issues

Even Rouault even.rouault at mines-paris.org
Thu Oct 28 15:57:29 EDT 2010


Le jeudi 28 octobre 2010 21:39:51, Buchheit, Maximilian a écrit :
> When you use "gdalwarp -tps" what is the practical limit to the number of
> GCPs useable in the thin plate spline algorithm before the program bogs
> down. I would like to use it  with  over 1600 spline knots spread over the
> image. Currently on a X86_64 smp linux system with 4 cores and 8 cpus and
> "-multi" turned on,  1600 knots takes about 30 min.  As far as I can
> gather from experimenting with the  # of knots, most of this time is spent
> with either solving for the spline weights or generating the spline
> kernel.

-multi can use currently only 2 threads : one for I/O, another one for 
computation. So more than 2 cores won't help.

> 
> Who can shed some light on what is going on under the hood here?  Is the
> spline kernel being calculated on-the-fly for every pixel in the image?
> What method of solving for the weights is being used, and can it handle
> very large sparse matrices?

Code lies in 
http://trac.osgeo.org/gdal/browser/trunk/gdal/alg/thinplatespline.cpp

As far as I know, only the get_point() method is called when reprojection is 
needed so I think it is linear in the number of nodes. Cannot help more on 
that. Perhaps retry with less nodes

> 
> Thanks,
>    Max
> 
> ------------------
> Max Buchheit
> Canada Centre for Remote Sensing / Centre Canadien de Télédétection
> Earth Sciences Sector / Secteur des Sciences de la Terre
> Natural Resources Canada / Ressources Naturelles Canada
> 4th Floor, 588 Booth Street /  4-ieme étage, 588 rue Booth
> Ottawa, Ontario, K1A 0Y7
> Phone: (613) 943-7444/ Email: mbuchhei at nrcan.gc.ca


More information about the gdal-dev mailing list