[GRASS-SVN] r62254 - grass/trunk/vector/v.what.rast
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Oct 14 14:12:43 PDT 2014
Author: neteler
Date: 2014-10-14 14:12:43 -0700 (Tue, 14 Oct 2014)
New Revision: 62254
Modified:
grass/trunk/vector/v.what.rast/main.c
Log:
v.what.rast: better treat points on region boundary, see http://lists.osgeo.org/pipermail/grass-dev/2014-October/071158.html (Glynn)
Modified: grass/trunk/vector/v.what.rast/main.c
===================================================================
--- grass/trunk/vector/v.what.rast/main.c 2014-10-14 20:25:09 UTC (rev 62253)
+++ grass/trunk/vector/v.what.rast/main.c 2014-10-14 21:12:43 UTC (rev 62254)
@@ -220,6 +220,8 @@
/* Add point to cache */
row = Rast_northing_to_row(Points->y[0], &window);
col = Rast_easting_to_col(Points->x[0], &window);
+ if (col < 0 || col >= window.cols || row < 0 || row >= window.rows)
+ continue;
cache[point_cnt].row = row;
cache[point_cnt].col = col;
More information about the grass-commit
mailing list