|
@@ -39,6 +39,32 @@ extern struct field_info *ff;
|
|
|
extern int count;
|
|
|
#endif
|
|
|
|
|
|
+struct interp_params;
|
|
|
+
|
|
|
+typedef int grid_calc_fn(
|
|
|
+ struct interp_params *, struct quaddata *, struct BM *,
|
|
|
+ double, double, double *, double *, double *, double *,
|
|
|
+ double *, double *, double *, double *, double *,
|
|
|
+ double *, off_t, double);
|
|
|
+
|
|
|
+typedef int matrix_create_fn(
|
|
|
+ struct interp_params *, struct triple *, int, double **, int *);
|
|
|
+
|
|
|
+typedef int check_points_fn(
|
|
|
+ struct interp_params *, struct quaddata *, double *,
|
|
|
+ double *, double, double, struct triple);
|
|
|
+
|
|
|
+typedef int secpar_fn(
|
|
|
+ struct interp_params *, int, int, int, struct BM *,
|
|
|
+ double *, double *, double *, double *, double *,
|
|
|
+ double *, int, int);
|
|
|
+
|
|
|
+typedef double interp_fn(double, double);
|
|
|
+
|
|
|
+typedef int interpder_fn(double, double, double *, double *);
|
|
|
+
|
|
|
+typedef int wr_temp_fn(struct interp_params *, int, int, off_t);
|
|
|
+
|
|
|
struct interp_params
|
|
|
{
|
|
|
double zmult; /* multiplier for z-values */
|
|
@@ -49,30 +75,33 @@ struct interp_params
|
|
|
int kmax; /* max number of points per segment */
|
|
|
char *maskmap; /* name of mask */
|
|
|
int nsizr, nsizc; /* number of rows and columns */
|
|
|
- DCELL *az, *adx, *ady, *adxx, *adyy, *adxy; /* array for interpolated values */
|
|
|
+ DCELL *az, *adx, *ady,
|
|
|
+ *adxx, *adyy, *adxy; /* array for interpolated values */
|
|
|
double fi; /* tension */
|
|
|
int KMAX2; /* max num. of points for interp. */
|
|
|
int scik1, scik2, scik3; /* multipliers for interp. values */
|
|
|
double rsm; /* smoothing */
|
|
|
- char *elev, *slope, *aspect, *pcurv, *tcurv, *mcurv; /* output files */
|
|
|
+ char *elev, *slope, *aspect,
|
|
|
+ *pcurv, *tcurv, *mcurv; /* output files */
|
|
|
double dmin; /* min distance between points */
|
|
|
double x_orig, y_orig; /* origin */
|
|
|
int deriv, cv; /* 1 if compute partial derivs */
|
|
|
double theta; /* anisotropy angle, 0=East,counter-clockwise */
|
|
|
double scalex; /* anisotropy scaling factor */
|
|
|
struct TimeStamp *ts; /* timestamp for raster files */
|
|
|
- FILE *Tmp_fd_z, *Tmp_fd_dx, *Tmp_fd_dy, /* temp files for writing interp. */
|
|
|
- *Tmp_fd_xx, *Tmp_fd_yy, *Tmp_fd_xy; /* values */
|
|
|
+ FILE *Tmp_fd_z, *Tmp_fd_dx,
|
|
|
+ *Tmp_fd_dy, *Tmp_fd_xx,
|
|
|
+ *Tmp_fd_yy, *Tmp_fd_xy; /* temp files for writing interp. values */
|
|
|
FILE *fddevi; /* pointer to deviations file */
|
|
|
|
|
|
- int (*grid_calc) (); /*calculates grid for given segm */
|
|
|
- int (*matrix_create) (); /*creates matrix for a given segm */
|
|
|
- int (*check_points) (); /*checks interp. func. at points */
|
|
|
- int (*secpar) (); /* calculates aspect,slope,curv. */
|
|
|
- double (*interp) (); /* radial based interp. function */
|
|
|
- int (*interpder) (); /* interp. func. for derivatives */
|
|
|
- int (*wr_temp) (); /* writes temp files */
|
|
|
- char *wheresql; /* SQL statement to select input points */
|
|
|
+ grid_calc_fn *grid_calc; /*calculates grid for given segm */
|
|
|
+ matrix_create_fn *matrix_create; /*creates matrix for a given segm */
|
|
|
+ check_points_fn *check_points; /*checks interp. func. at points */
|
|
|
+ secpar_fn *secpar; /* calculates aspect,slope,curv. */
|
|
|
+ interp_fn *interp; /* radial based interp. function */
|
|
|
+ interpder_fn *interpder; /* interp. func. for derivatives */
|
|
|
+ wr_temp_fn *wr_temp; /* writes temp files */
|
|
|
+ const char *wheresql; /* SQL statement to select input points */
|
|
|
};
|
|
|
|
|
|
/* distance.c */
|
|
@@ -92,8 +121,9 @@ void IL_init_params_2d(struct interp_params *, FILE *, int, int, double,
|
|
|
FILE *, FILE *, FILE *, FILE *, FILE *, FILE *, FILE *,
|
|
|
struct TimeStamp *, int, const char *);
|
|
|
|
|
|
-void IL_init_func_2d(struct interp_params *, int (*)(), int (*)(), int (*)(),
|
|
|
- int (*)(), double (*)(), int (*)(), int (*)());
|
|
|
+void IL_init_func_2d(struct interp_params *, grid_calc_fn *,
|
|
|
+ matrix_create_fn *, check_points_fn *, secpar_fn *,
|
|
|
+ interp_fn *, interpder_fn *, wr_temp_fn *);
|
|
|
/* input2d.c */
|
|
|
int IL_input_data_2d(struct interp_params *, struct tree_info *, double *,
|
|
|
double *, double *, double *, double *, double *, int *);
|
|
@@ -104,7 +134,7 @@ int translate_quad(struct multtree *, double, double, double, int);
|
|
|
int IL_grid_calc_2d(struct interp_params *, struct quaddata *, struct BM *,
|
|
|
double, double, double *, double *, double *, double *,
|
|
|
double *, double *, double *, double *, double *,
|
|
|
- double *, int, double);
|
|
|
+ double *, off_t, double);
|
|
|
/* matrix.c */
|
|
|
int IL_matrix_create(struct interp_params *, struct triple *, int, double **,
|
|
|
int *);
|
|
@@ -138,7 +168,7 @@ int IL_resample_output_2d(struct interp_params *, double, double, double,
|
|
|
int IL_resample_interp_segments_2d(struct interp_params *, struct BM *,
|
|
|
double, double, double *, double *,
|
|
|
double *, double *, double *, double *,
|
|
|
- double *, double *, double *, int,
|
|
|
+ double *, double *, double *, off_t,
|
|
|
double *, int, int, int, int, int, double,
|
|
|
double, double, double, int);
|
|
|
/* secpar2d.c */
|
|
@@ -149,7 +179,7 @@ int IL_secpar_loop_2d(struct interp_params *, int, int, int, struct BM *,
|
|
|
int IL_interp_segments_2d(struct interp_params *, struct tree_info *,
|
|
|
struct multtree *, struct BM *, double, double,
|
|
|
double *, double *, double *, double *, double *,
|
|
|
- double *, double *, double *, double *, int, int,
|
|
|
+ double *, double *, double *, double *, int, off_t,
|
|
|
double);
|
|
|
/* vinput2d.c */
|
|
|
int IL_vector_input_data_2d(struct interp_params *, struct Map_info *, int,
|
|
@@ -160,4 +190,4 @@ int process_point(double, double, double, double, struct tree_info *, double,
|
|
|
double *, double *, double *, double *, double *, double *,
|
|
|
int *, int *, int *);
|
|
|
/* write2d.c */
|
|
|
-int IL_write_temp_2d(struct interp_params *, int, int, int);
|
|
|
+int IL_write_temp_2d(struct interp_params *, int, int, off_t);
|