GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
Loading...
Searching...
No Matches
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
12int 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 */
33void Rast3d_set_null_value(void *c, int nofElts, int type)
34{
35 if (type == FCELL_TYPE) {
36 Rast_set_f_null_value((float *)c, nofElts);
37 return;
38 }
39
40 Rast_set_d_null_value((double *)c, nofElts);
41}
#define Rast_is_f_null_value(fcellVal)
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)
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:33
#define FCELL_TYPE
Definition raster.h:12