[GRASS-SVN] r43596 - grass/trunk/raster/r.surf.contour
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 21 10:38:04 EDT 2010
Author: mmetz
Date: 2010-09-21 14:38:04 +0000 (Tue, 21 Sep 2010)
New Revision: 43596
Modified:
grass/trunk/raster/r.surf.contour/find_con.c
grass/trunk/raster/r.surf.contour/main.c
Log:
fix for #959, another nodata fix
Modified: grass/trunk/raster/r.surf.contour/find_con.c
===================================================================
--- grass/trunk/raster/r.surf.contour/find_con.c 2010-09-21 14:15:26 UTC (rev 43595)
+++ grass/trunk/raster/r.surf.contour/find_con.c 2010-09-21 14:38:04 UTC (rev 43596)
@@ -8,9 +8,6 @@
double dd, shortest;
DCELL value;
-/* *con1 = 0;
- *con2 = 0;
-*/
Rast_set_d_null_value(con1, 1);
Rast_set_d_null_value(con2, 1);
*d1 = *d2 = 1.0;
Modified: grass/trunk/raster/r.surf.contour/main.c
===================================================================
--- grass/trunk/raster/r.surf.contour/main.c 2010-09-21 14:15:26 UTC (rev 43595)
+++ grass/trunk/raster/r.surf.contour/main.c 2010-09-21 14:38:04 UTC (rev 43596)
@@ -98,6 +98,7 @@
file_fd = Rast_open_new(alt_name, DCELL_TYPE);
for (r = 0; r < nrows; r++) {
G_percent(r, nrows, 1);
+ Rast_set_d_null_value(alt_row, ncols);
for (c = 0; c < ncols; c++) {
if (FLAG_GET(mask, r, c))
continue;
@@ -107,7 +108,7 @@
continue;
}
find_con(r, c, &d1, &d2, &con1, &con2);
- if (con2 > 0)
+ if (!Rast_is_d_null_value(&con2))
alt_row[c] = d2 * con1 / (d1 + d2) +
d1 * con2 / (d1 + d2);
else
More information about the grass-commit
mailing list