GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
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 /*!
24  * \brief
25  *
26  * Fills the vector pointed to by <em>c</em> with <em>nofElts</em> NULL-values
27  * of <em>type</em>.
28  *
29  * \param c
30  * \param nofElts
31  * \param type
32  * \return void
33  */
34 
35 void Rast3d_set_null_value(void *c, int nofElts, int type)
36 {
37  if (type == FCELL_TYPE) {
38  Rast_set_f_null_value((float *)c, nofElts);
39  return;
40  }
41 
42  Rast_set_d_null_value((double *)c, nofElts);
43 }
#define Rast_is_d_null_value(dcellVal)
Definition: defs/raster.h:414
#define Rast_is_f_null_value(fcellVal)
Definition: defs/raster.h:412
void Rast_set_f_null_value(FCELL *, int)
To set a number of FCELL raster values to NULL.
Definition: null_val.c:138
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:35
#define FCELL_TYPE
Definition: raster.h:12
void Rast_set_d_null_value(DCELL *, int)
To set a number of DCELL raster values to NULL.
Definition: null_val.c:155