Loading...
Searching...
No Matches
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.

## Macros

#define | CEULER .57721566

## Functions

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

Author
  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)

Copyright
  (C) 1993-1999 by Lubos Mitas and the GRASS Development Team
  This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Definition in file interp2d.c.

## Macro Definition Documentation

## CEULER

#define CEULER .57721566

Definition at line 48 of file interp2d.c.

## Function Documentation

## IL_grid_calc_2d()

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

Parameters

  data | given segment
  bitmask | bitmask
  zmax | min and max input z-values
  zmaxac | min and max interp. z-values
  gmax | min and max interp. slope val.
  c1max | min and max interp. curv. val.
  c2max | min and max interp. curv. val.
  ertot | total interpolating func. error
  b | solutions of linear equations
  offset1 | offset for temp file writing

Definition at line 61 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, b, BM_get(), interp_params::deriv, interp_params::fi, G_warning(), interp_params::interp, interp_params::interpder, interp_params::KMAX2, l, quaddata::n_cols, quaddata::n_points, quaddata::n_rows, NULL, quaddata::points, r, interp_params::scalex, interp_params::secpar, interp_params::theta, interp_params::wr_temp, triple::x, and triple::y.