Martin,

Patch applied. Thanks !

Even

> I had a similar problem when not using armadillo, but a simple

> transformation does the trick. The problem is that usually the distance of

> different gcps compared their absolute value is very small.

>

> This leads to a bad conditioned linear equation system (see

> https://en.wikipedia.org/wiki/Condition_number): The first column consists

> of 1s and the second and third of the x, y values of the gcps respectively.

> Now if the difference of the gcps is relatively small the second and third

> row are nearly colinear to the first one, hence the matrix is nearly

> singular.

>

> The solution is to shift the coordinate system by the mean value of all gcps

> and solving the modified linear equations. Since the basis function of the

> TPS only depends on the difference of coordinates the resulting

> transformation is the same.

>

> For the implementation details see the attached patch file.

>

> Martin

--

Spatialys - Geospatial professional services

http://www.spatialys.com

_______________________________________________

gdal-dev mailing list

[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev