2 #include <grass/raster.h>
4 void c_max(DCELL * result, DCELL * values,
int n,
const void *closure)
9 Rast_set_d_null_value(&
max, 1);
11 for (i = 0; i < n; i++) {
12 if (Rast_is_d_null_value(&values[i]))
15 if (Rast_is_d_null_value(&
max) ||
max < values[i])
19 if (Rast_is_d_null_value(&
max))
20 Rast_set_d_null_value(result, 1);
25 void w_max(DCELL * result, DCELL(*values)[2],
int n,
const void *closure)
30 Rast_set_d_null_value(&
max, 1);
32 for (i = 0; i < n; i++) {
33 if (Rast_is_d_null_value(&values[i][0]))
36 if (Rast_is_d_null_value(&
max) ||
max < values[i][0])
40 if (Rast_is_d_null_value(&
max))
41 Rast_set_d_null_value(result, 1);