33 #ifndef THINPLATESPLINE_H_INCLUDED
34 #define THINPLATESPLINE_H_INCLUDED
43 VIZ_GEOREF_SPLINE_ZERO_POINTS,
44 VIZ_GEOREF_SPLINE_ONE_POINT,
45 VIZ_GEOREF_SPLINE_TWO_POINTS,
46 VIZ_GEOREF_SPLINE_ONE_DIMENSIONAL,
47 VIZ_GEOREF_SPLINE_FULL,
49 VIZ_GEOREF_SPLINE_POINT_WAS_ADDED,
50 VIZ_GEOREF_SPLINE_POINT_WAS_DELETED
54 #define VIZGEOREF_MAX_VARS 2
56 class VizGeorefSpline2D
61 explicit VizGeorefSpline2D(
int nof_vars = 1)
62 : type(VIZ_GEOREF_SPLINE_ZERO_POINTS), _nof_vars(nof_vars),
63 _nof_points(0), _max_nof_points(0), _nof_eqs(0),
69 _dx(0.0), _dy(0.0), x(nullptr), y(nullptr), u(nullptr),
70 unused(nullptr), index(nullptr), x_mean(0), y_mean(0)
72 for (
int i = 0; i < VIZGEOREF_MAX_VARS; i++)
88 for (
int i = 0; i < _nof_vars; i++)
100 void set_toler(
double tx,
double ty ){
105 void get_toler(
double& tx,
double& ty) {
110 vizGeorefInterType get_interpolation_type ( ){
114 void dump_data_points()
116 for (
int i = 0; i < _nof_points; i++ )
118 fprintf(stderr,
"X = %f Y = %f Vars = ", x[i], y[i]);
119 for (
int v = 0; v < _nof_vars; v++ )
120 fprintf(stderr,
"%f ", rhs[v][i+3]);
121 fprintf(stderr,
"\n");
128 type = VIZ_GEOREF_SPLINE_ZERO_POINTS;
143 bool add_point(
const double Px,
const double Py,
const double *Pvars);
144 int get_point(
const double Px,
const double Py,
double *Pvars);
146 int delete_point(
const double Px,
const double Py );
147 bool get_xy(
int index,
double& x,
double& y);
148 bool change_point(
int index,
double x,
double y,
double* Pvars);
149 void reset(
void) { _nof_points = 0; }
154 vizGeorefInterType type;
174 double *rhs[VIZGEOREF_MAX_VARS];
175 double *coef[VIZGEOREF_MAX_VARS];
Various convenience functions for CPL.
#define CPLFree
Alias of VSIFree()
Definition: cpl_conv.h:98
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition: cpl_port.h:1042
Public (C callable) GDAL algorithm entry points, and definitions.