GRASS GIS 8 Programmer's Manual  8.4.0dev(2024)-7413740dd8
null.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <sys/types.h>
4 #include <unistd.h>
5 
6 #include <grass/raster.h>
7 
8 #include "raster3d_intern.h"
9 
10 /*---------------------------------------------------------------------------*/
11 
12 int Rast3d_is_null_value_num(const void *n, int type)
13 {
14  if (type == FCELL_TYPE)
15  return Rast_is_f_null_value(n);
16  else
17  return Rast_is_d_null_value(n);
18 }
19 
20 /*---------------------------------------------------------------------------*/
21 
22 /*!
23  * \brief
24  *
25  * Fills the vector pointed to by <em>c</em> with <em>nofElts</em> NULL-values
26  * of <em>type</em>.
27  *
28  * \param c
29  * \param nofElts
30  * \param type
31  * \return void
32  */
33 
34 void Rast3d_set_null_value(void *c, int nofElts, int type)
35 {
36  if (type == FCELL_TYPE) {
37  Rast_set_f_null_value((float *)c, nofElts);
38  return;
39  }
40 
41  Rast_set_d_null_value((double *)c, nofElts);
42 }
#define Rast_is_f_null_value(fcellVal)
Definition: defs/raster.h:403
void Rast_set_d_null_value(DCELL *, int)
To set a number of DCELL raster values to NULL.
Definition: null_val.c:153
void Rast_set_f_null_value(FCELL *, int)
To set a number of FCELL raster values to NULL.
Definition: null_val.c:138
#define Rast_is_d_null_value(dcellVal)
Definition: defs/raster.h:405
int Rast3d_is_null_value_num(const void *n, int type)
Definition: null.c:12
void Rast3d_set_null_value(void *c, int nofElts, int type)
Fills the vector pointed to by c with nofElts NULL-values of type.
Definition: null.c:34
#define FCELL_TYPE
Definition: raster.h:12