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
62 explicit VizGeorefSpline2D(
int nof_vars = 1) :
63 type(VIZ_GEOREF_SPLINE_ZERO_POINTS),
83 for(
int i = 0; i < VIZGEOREF_MAX_VARS; i++ )
92 ~VizGeorefSpline2D() {
98 for(
int i = 0; i < _nof_vars; i++ )
106 int get_nof_points(){
110 void set_toler(
double tx,
double ty ){
115 void get_toler(
double& tx,
double& ty) {
120 vizGeorefInterType get_interpolation_type ( ){
124 void dump_data_points()
126 for (
int i = 0; i < _nof_points; i++ )
128 fprintf(stderr,
"X = %f Y = %f Vars = ", x[i], y[i]);
129 for (
int v = 0; v < _nof_vars; v++ )
130 fprintf(stderr,
"%f ", rhs[v][i+3]);
131 fprintf(stderr,
"\n");
138 type = VIZ_GEOREF_SPLINE_ZERO_POINTS;
153 bool add_point(
const double Px,
const double Py,
const double *Pvars );
154 int get_point(
const double Px,
const double Py,
double *Pvars );
156 int delete_point(
const double Px,
const double Py );
157 bool get_xy(
int index,
double& x,
double& y);
158 bool change_point(
int index,
double x,
double y,
double* Pvars);
159 void reset(
void) { _nof_points = 0; }
165 vizGeorefInterType type;
185 double *rhs[VIZGEOREF_MAX_VARS];
186 double *coef[VIZGEOREF_MAX_VARS];
#define CPLFree
Alias of VSIFree()
Definition: cpl_conv.h:81
Various convenience functions for CPL.
Public (C callable) GDAL algorithm entry points, and definitions.
#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:989