GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-8f4931381
interp.c File Reference

Raster Library - Interpolation methods. More...

#include <math.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/glocale.h>
Include dependency graph for interp.c:

Go to the source code of this file.

Functions

DCELL Rast_interp_linear (double u, DCELL c0, DCELL c1)
 
DCELL Rast_interp_bilinear (double u, double v, DCELL c00, DCELL c01, DCELL c10, DCELL c11)
 
DCELL Rast_interp_cubic (double u, DCELL c0, DCELL c1, DCELL c2, DCELL c3)
 
DCELL Rast_interp_bicubic (double u, double v, DCELL c00, DCELL c01, DCELL c02, DCELL c03, DCELL c10, DCELL c11, DCELL c12, DCELL c13, DCELL c20, DCELL c21, DCELL c22, DCELL c23, DCELL c30, DCELL c31, DCELL c32, DCELL c33)
 
DCELL Rast_interp_lanczos (double u, double v, DCELL *c)
 
DCELL Rast_interp_cubic_bspline (double u, DCELL c0, DCELL c1, DCELL c2, DCELL c3)
 
DCELL Rast_interp_bicubic_bspline (double u, double v, DCELL c00, DCELL c01, DCELL c02, DCELL c03, DCELL c10, DCELL c11, DCELL c12, DCELL c13, DCELL c20, DCELL c21, DCELL c22, DCELL c23, DCELL c30, DCELL c31, DCELL c32, DCELL c33)
 
int Rast_option_to_interp_type (const struct Option *option)
 Get interpolation method from the option. More...
 

Detailed Description

Raster Library - Interpolation methods.

(C) 2001-2009,2013 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.

Author
Original author CERL

Definition in file interp.c.

Function Documentation

◆ Rast_interp_bicubic()

DCELL Rast_interp_bicubic ( double  u,
double  v,
DCELL  c00,
DCELL  c01,
DCELL  c02,
DCELL  c03,
DCELL  c10,
DCELL  c11,
DCELL  c12,
DCELL  c13,
DCELL  c20,
DCELL  c21,
DCELL  c22,
DCELL  c23,
DCELL  c30,
DCELL  c31,
DCELL  c32,
DCELL  c33 
)

Definition at line 42 of file interp.c.

◆ Rast_interp_bicubic_bspline()

DCELL Rast_interp_bicubic_bspline ( double  u,
double  v,
DCELL  c00,
DCELL  c01,
DCELL  c02,
DCELL  c03,
DCELL  c10,
DCELL  c11,
DCELL  c12,
DCELL  c13,
DCELL  c20,
DCELL  c21,
DCELL  c22,
DCELL  c23,
DCELL  c30,
DCELL  c31,
DCELL  c32,
DCELL  c33 
)

Definition at line 153 of file interp.c.

◆ Rast_interp_bilinear()

DCELL Rast_interp_bilinear ( double  u,
double  v,
DCELL  c00,
DCELL  c01,
DCELL  c10,
DCELL  c11 
)

Definition at line 26 of file interp.c.

◆ Rast_interp_cubic()

DCELL Rast_interp_cubic ( double  u,
DCELL  c0,
DCELL  c1,
DCELL  c2,
DCELL  c3 
)

Definition at line 35 of file interp.c.

◆ Rast_interp_cubic_bspline()

DCELL Rast_interp_cubic_bspline ( double  u,
DCELL  c0,
DCELL  c1,
DCELL  c2,
DCELL  c3 
)

Definition at line 145 of file interp.c.

◆ Rast_interp_lanczos()

DCELL Rast_interp_lanczos ( double  u,
double  v,
DCELL c 
)

Definition at line 56 of file interp.c.

◆ Rast_interp_linear()

DCELL Rast_interp_linear ( double  u,
DCELL  c0,
DCELL  c1 
)

Definition at line 21 of file interp.c.

◆ Rast_option_to_interp_type()

int Rast_option_to_interp_type ( const struct Option option)

Get interpolation method from the option.

Calls G_fatal_error() on unknown interpolation method.

Supported methods:

  • NEAREST
  • BILINEAR
  • CUBIC
int interp_method
struct Option *opt_method;
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
interp_method = G_option_to_interp_type(opt_method);
Parameters
optionpointer to interpolation option
Returns
interpolation method code

Definition at line 193 of file interp.c.

References _, Option::answer, G_fatal_error(), INTERP_BICUBIC, INTERP_BILINEAR, INTERP_NEAREST, and INTERP_UNKNOWN.