|
@@ -112,7 +112,7 @@ int calculate(int fd, struct area_entry *ad, double *result)
|
|
{
|
|
{
|
|
CELL *buf, *buf_sup, *buf_null;
|
|
CELL *buf, *buf_sup, *buf_null;
|
|
CELL corrCell, precCell, supCell;
|
|
CELL corrCell, precCell, supCell;
|
|
- long npatch, area;
|
|
|
|
|
|
+ long npatch;
|
|
long pid, old_pid, new_pid, *pid_corr, *pid_sup, *ltmp;
|
|
long pid, old_pid, new_pid, *pid_corr, *pid_sup, *ltmp;
|
|
struct pst *pst;
|
|
struct pst *pst;
|
|
long nalloc, incr;
|
|
long nalloc, incr;
|
|
@@ -158,7 +158,6 @@ int calculate(int fd, struct area_entry *ad, double *result)
|
|
|
|
|
|
/* calculate number of patches */
|
|
/* calculate number of patches */
|
|
npatch = 0;
|
|
npatch = 0;
|
|
- area = 0;
|
|
|
|
pid = 0;
|
|
pid = 0;
|
|
|
|
|
|
/* patch size and type */
|
|
/* patch size and type */
|
|
@@ -204,10 +203,6 @@ int calculate(int fd, struct area_entry *ad, double *result)
|
|
if (masked && (mask_buf[j] == 0)) {
|
|
if (masked && (mask_buf[j] == 0)) {
|
|
Rast_set_c_null_value(&corrCell, 1);
|
|
Rast_set_c_null_value(&corrCell, 1);
|
|
}
|
|
}
|
|
- else {
|
|
|
|
- /* total sample area */
|
|
|
|
- area++;
|
|
|
|
- }
|
|
|
|
|
|
|
|
supCell = buf_sup[j + ad->x];
|
|
supCell = buf_sup[j + ad->x];
|
|
if (masked && (mask_sup[j] == 0)) {
|
|
if (masked && (mask_sup[j] == 0)) {
|
|
@@ -351,7 +346,7 @@ int calculateD(int fd, struct area_entry *ad, double *result)
|
|
{
|
|
{
|
|
DCELL *buf, *buf_sup, *buf_null;
|
|
DCELL *buf, *buf_sup, *buf_null;
|
|
DCELL corrCell, precCell, supCell;
|
|
DCELL corrCell, precCell, supCell;
|
|
- long npatch, area;
|
|
|
|
|
|
+ long npatch;
|
|
long pid, old_pid, new_pid, *pid_corr, *pid_sup, *ltmp;
|
|
long pid, old_pid, new_pid, *pid_corr, *pid_sup, *ltmp;
|
|
struct pst *pst;
|
|
struct pst *pst;
|
|
long nalloc, incr;
|
|
long nalloc, incr;
|
|
@@ -397,7 +392,6 @@ int calculateD(int fd, struct area_entry *ad, double *result)
|
|
|
|
|
|
/* calculate number of patches */
|
|
/* calculate number of patches */
|
|
npatch = 0;
|
|
npatch = 0;
|
|
- area = 0;
|
|
|
|
pid = 0;
|
|
pid = 0;
|
|
|
|
|
|
/* patch size and type */
|
|
/* patch size and type */
|
|
@@ -443,10 +437,6 @@ int calculateD(int fd, struct area_entry *ad, double *result)
|
|
if (masked && (mask_buf[j] == 0)) {
|
|
if (masked && (mask_buf[j] == 0)) {
|
|
Rast_set_d_null_value(&corrCell, 1);
|
|
Rast_set_d_null_value(&corrCell, 1);
|
|
}
|
|
}
|
|
- else {
|
|
|
|
- /* total sample area */
|
|
|
|
- area++;
|
|
|
|
- }
|
|
|
|
|
|
|
|
supCell = buf_sup[j + ad->x];
|
|
supCell = buf_sup[j + ad->x];
|
|
if (masked && (mask_sup[j] == 0)) {
|
|
if (masked && (mask_sup[j] == 0)) {
|
|
@@ -590,7 +580,7 @@ int calculateF(int fd, struct area_entry *ad, double *result)
|
|
{
|
|
{
|
|
FCELL *buf, *buf_sup, *buf_null;
|
|
FCELL *buf, *buf_sup, *buf_null;
|
|
FCELL corrCell, precCell, supCell;
|
|
FCELL corrCell, precCell, supCell;
|
|
- long npatch, area;
|
|
|
|
|
|
+ long npatch;
|
|
long pid, old_pid, new_pid, *pid_corr, *pid_sup, *ltmp;
|
|
long pid, old_pid, new_pid, *pid_corr, *pid_sup, *ltmp;
|
|
struct pst *pst;
|
|
struct pst *pst;
|
|
long nalloc, incr;
|
|
long nalloc, incr;
|
|
@@ -636,7 +626,6 @@ int calculateF(int fd, struct area_entry *ad, double *result)
|
|
|
|
|
|
/* calculate number of patches */
|
|
/* calculate number of patches */
|
|
npatch = 0;
|
|
npatch = 0;
|
|
- area = 0;
|
|
|
|
pid = 0;
|
|
pid = 0;
|
|
|
|
|
|
/* patch size and type */
|
|
/* patch size and type */
|
|
@@ -682,10 +671,6 @@ int calculateF(int fd, struct area_entry *ad, double *result)
|
|
if (masked && (mask_buf[j] == 0)) {
|
|
if (masked && (mask_buf[j] == 0)) {
|
|
Rast_set_f_null_value(&corrCell, 1);
|
|
Rast_set_f_null_value(&corrCell, 1);
|
|
}
|
|
}
|
|
- else {
|
|
|
|
- /* total sample area */
|
|
|
|
- area++;
|
|
|
|
- }
|
|
|
|
|
|
|
|
supCell = buf_sup[j + ad->x];
|
|
supCell = buf_sup[j + ad->x];
|
|
if (masked && (mask_sup[j] == 0)) {
|
|
if (masked && (mask_sup[j] == 0)) {
|