Kaynağa Gözat

r.volume; fix count

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56987 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 yıl önce
ebeveyn
işleme
0d807a5cdd
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3 2
      raster/r.volume/main.c

+ 3 - 2
raster/r.volume/main.c

@@ -166,9 +166,10 @@ int main(int argc, char *argv[])
 		    row, col, i, clumpmap, max);
 	    if (i < 1)
 		continue;	/* ignore zeros and negs */
+	    if (Rast_is_d_null_value(&data_buf[col]))
+		continue;
+	    sum[i] += data_buf[col];
 	    count[i]++;
-	    if (!Rast_is_d_null_value(&data_buf[col]))
-		sum[i] += data_buf[col];
 	}
     }
     G_percent(row, rows, 2);