GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
gradient.c File Reference

Gradient computation. More...

#include <grass/raster3d.h>
Include dependency graph for gradient.c:

Go to the source code of this file.

Functions

void Rast3d_gradient_double (RASTER3D_Array_double *array, double *step, RASTER3D_Array_double *grad_x, RASTER3D_Array_double *grad_y, RASTER3D_Array_double *grad_z)
 Gradient computation. More...
 

Detailed Description

Gradient computation.

(C) 2014 by 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.

Author
Anna Petrasova

Definition in file gradient.c.

Function Documentation

◆ Rast3d_gradient_double()

void Rast3d_gradient_double ( RASTER3D_Array_double array,
double *  step,
RASTER3D_Array_double grad_x,
RASTER3D_Array_double grad_y,
RASTER3D_Array_double grad_z 
)

Gradient computation.

Gradient computation (second order approximation) using central differencing scheme (plus forward and backward difference of second order approximation). When one or more of the cells, from which the gradient for a particular cell is computed, is null, gradient for that particular cell is set to 0.

Parameters
arraypointer to RASTER3D_Array with input values
steparray of x, y, z steps for gradient (resolution values)
[out]grad_xpointer to RASTER3D_Array_double with gradient in x direction
[out]grad_ypointer to RASTER3D_Array_double with gradient in y direction
[out]grad_zpointer to RASTER3D_Array_double with gradient in z direction

Definition at line 34 of file gradient.c.