diff -aur alg/thinplatespline.cpp alg_mod/thinplatespline.cpp
--- alg/thinplatespline.cpp	2018-05-18 15:30:29.069317529 +0200
+++ alg_mod/thinplatespline.cpp	2018-05-18 15:51:42.863332559 +0200
@@ -572,8 +572,20 @@
         for( int c = 0; c < 3; c++ )
             A(r, c) = 0.0;
 
+    x_mean = 0;
+    y_mean = 0;
     for( int c = 0; c < _nof_points; c++ )
     {
+        x_mean += x[c];
+        y_mean += y[c];
+    }
+    x_mean /= _nof_points;
+    y_mean /= _nof_points;
+
+    for( int c = 0; c < _nof_points; c++ )
+    {
+        x[c] -= x_mean;
+        y[c] -= y_mean;
         A(0, c+3) = 1.0;
         A(1, c+3) = x[c];
         A(2, c+3) = y[c];
@@ -686,9 +698,9 @@
     }
     case VIZ_GEOREF_SPLINE_FULL:
     {
-        const double Pxy[2] = { Px, Py };
+        const double Pxy[2] = { Px - x_mean, Py -y_mean };
         for( int v = 0; v < _nof_vars; v++ )
-            vars[v] = coef[v][0] + coef[v][1] * Px + coef[v][2] * Py;
+            vars[v] = coef[v][0] + coef[v][1] * Pxy[0] + coef[v][2] * Pxy[1];
 
         int r = 0;  // Used after for.
         for( ; r < (_nof_points & (~3)); r+=4 )
@@ -703,7 +715,7 @@
         }
         for( ; r < _nof_points; r++ )
         {
-            const double tmp = VizGeorefSpline2DBase_func( Px, Py, x[r], y[r] );
+            const double tmp = VizGeorefSpline2DBase_func( Pxy[0], Pxy[1], x[r], y[r] );
             for( int v= 0; v < _nof_vars; v++ )
                 vars[v] += coef[v][r+3] * tmp;
         }
diff -aur alg/thinplatespline.h alg_mod/thinplatespline.h
--- alg/thinplatespline.h	2018-05-04 18:06:29.000000000 +0200
+++ alg_mod/thinplatespline.h	2018-05-18 15:16:11.881290491 +0200
@@ -76,7 +76,9 @@
         y(nullptr),
         u(nullptr),
         unused(nullptr),
-        index(nullptr)
+        index(nullptr),
+        x_mean(0),
+        y_mean(0)
     {
         for( int i = 0; i < VIZGEOREF_MAX_VARS; i++ )
         {
@@ -187,6 +189,7 @@
     int *unused; // [VIZ_GEOREF_SPLINE_MAX_POINTS];
     int *index; // [VIZ_GEOREF_SPLINE_MAX_POINTS];
 
+    double x_mean, y_mean;
   private:
     CPL_DISALLOW_COPY_ASSIGN(VizGeorefSpline2D)
 };
