Loading...
Searching...
No Matches
c_count.c
Go to the documentation of this file.
#include <grass/gis.h>
#include <grass/raster.h>
void c_count(DCELL *result, DCELL *values, int n, const void *closure G_UNUSED)
{
int count;
int i;
count = 0;
for (i = 0; i < n; i++)
if (!Rast_is_d_null_value(&values[i]))
count++;
*result = count;
}
void w_count(DCELL *result, DCELL (*values)[2], int n,
const void *closure G_UNUSED)
{
DCELL count;
int i;
count = 0.0;
for (i = 0; i < n; i++)
if (!Rast_is_d_null_value(&values[i][0]))
count += values[i][1];
*result = count;
}
w_count
void w_count(DCELL *result, DCELL(*values)[2], int n, const void *closure)
Definition c_count.c:18
c_count
void c_count(DCELL *result, DCELL *values, int n, const void *closure)
Definition c_count.c:4
count
int count