[GRASS-SVN] r67261 - grass/trunk/vector/v.what.rast
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 19 18:05:50 PST 2015
Author: hamish
Date: 2015-12-19 18:05:50 -0800 (Sat, 19 Dec 2015)
New Revision: 67261
Modified:
grass/trunk/vector/v.what.rast/main.c
Log:
bugfix: when the interpolation flag was used with FCELL maps, and the query point was on the northern or southern row of the map, only the first half of the out-of-region row was flushed to NULL as floats are only half as wide as doubles. Force NULL flush for the entire DCELL row buffer to avoid uninitiated 0s being included in the weighted average result for query points on the eastern side of the raster row. (backport candidate)
Modified: grass/trunk/vector/v.what.rast/main.c
===================================================================
--- grass/trunk/vector/v.what.rast/main.c 2015-12-20 01:31:08 UTC (rev 67260)
+++ grass/trunk/vector/v.what.rast/main.c 2015-12-20 02:05:50 UTC (rev 67261)
@@ -327,13 +327,13 @@
if (interp_flag->answer) {
if (cache[point].row <= 0)
Rast_set_null_value(prev_d_row, window.cols,
- out_type);
+ DCELL_TYPE);
else
Rast_get_d_row(fd, prev_d_row, cache[point].row - 1);
if (cache[point].row + 1 > window.rows - 1)
Rast_set_null_value(next_d_row, window.cols,
- out_type);
+ DCELL_TYPE);
else
Rast_get_d_row(fd, next_d_row, cache[point].row + 1);
}
More information about the grass-commit
mailing list