GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72375
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
interp2d.c File Reference
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/glocale.h>
#include <grass/bitmap.h>
#include <grass/interpf.h>
Include dependency graph for interp2d.c:

Go to the source code of this file.


#define CEULER   .57721566


int IL_grid_calc_2d (struct interp_params *params, struct quaddata *data, struct BM *bitmask, double zmin, double zmax, double *zminac, double *zmaxac, double *gmin, double *gmax, double *c1min, double *c1max, double *c2min, double *c2max, double *ertot, double *b, off_t offset1, double dnorm)

Detailed Description

Lubos Mitas (original program and various modifications)
H. Mitasova, I. Kosinovsky, D. Gerdes, D. McCauley (GRASS4.1 version of the program and GRASS4.2 modifications)
L. Mitas, H. Mitasova, I. Kosinovsky, D.Gerdes, D. McCauley (1993, 1995)
modified by McCauley in August 1995
modified by Mitasova in August 1995, Nov. 1996
bug fixes(mask) and modification for variable smoothing Mitasova (Jan 1997)

Definition in file interp2d.c.

Macro Definition Documentation

#define CEULER   .57721566

Definition at line 51 of file interp2d.c.

Function Documentation

int IL_grid_calc_2d ( struct interp_params params,
struct quaddata data,
struct BM bitmask,
double  zmin,
double  zmax,
double *  zminac,
double *  zmaxac,
double *  gmin,
double *  gmax,
double *  c1min,
double *  c1max,
double *  c2min,
double *  c2max,
double *  ertot,
double *  b,
off_t  offset1,
double  dnorm 

Calculates grid values for a given segment

Calculates grid for the given segment represented by data (contains n_rows, n_cols, ew_res,ns_res, and all points inside + overlap) using solutions of system of linear equations and interpolating functions interp() and interpder(). Also calls secpar() to compute slope, aspect and curvatures if required.

ertot can be also called RMS deviation of the interpolated surface

datagiven segment
zmaxmin and max input z-values
zmaxacmin and max interp. z-values
gmaxmin and max interp. slope val.
c1maxmin and max interp. curv. val.
c2maxmin and max interp. curv. val.
ertottotal interpolating func. error
bsolutions of linear equations
offset1offset for temp file writing

Definition at line 65 of file interp2d.c.

References _, interp_params::adx, interp_params::adxx, interp_params::adxy, interp_params::ady, interp_params::adyy, amax1(), amin1(), interp_params::az, BM_get(), interp_params::deriv, interp_params::fi, G_warning(), int, interp_params::interp, interp_params::interpder, interp_params::KMAX2, l, M_R2D, quaddata::n_cols, quaddata::n_points, quaddata::n_rows, NULL, quaddata::points, r, Rast_set_d_null_value(), interp_params::scalex, interp_params::secpar, interp_params::theta, interp_params::wr_temp, triple::x, quaddata::x_orig, triple::y, quaddata::y_orig, and quaddata::ymax.