[GRASS-SVN] r58752 - grass/trunk/raster/r.what
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 20 23:39:05 PST 2014
Author: mmetz
Date: 2014-01-20 23:39:04 -0800 (Mon, 20 Jan 2014)
New Revision: 58752
Modified:
grass/trunk/raster/r.what/main.c
Log:
r.what: fix reading vector points
Modified: grass/trunk/raster/r.what/main.c
===================================================================
--- grass/trunk/raster/r.what/main.c 2014-01-20 21:40:54 UTC (rev 58751)
+++ grass/trunk/raster/r.what/main.c 2014-01-21 07:39:04 UTC (rev 58752)
@@ -307,8 +307,8 @@
else {
east = Points->x[0];
north = Points->y[0];
- sprintf(cache[point_cnt].east_buf, "%f", east);
- sprintf(cache[point_cnt].north_buf, "%f", north);
+ sprintf(cache[point_cnt].east_buf, "%.15g", east);
+ sprintf(cache[point_cnt].north_buf, "%.15g", north);
}
}
else {
@@ -357,10 +357,12 @@
if (dcol == window.cols)
dcol--;
- cache[point_cnt].row = (int)drow;
- cache[point_cnt].col = (int)dcol;
- cache[point_cnt].point = point_cnt;
- point_cnt++;
+ if (!done) {
+ cache[point_cnt].row = (int)drow;
+ cache[point_cnt].col = (int)dcol;
+ cache[point_cnt].point = point_cnt;
+ point_cnt++;
+ }
}
}
}
More information about the grass-commit
mailing list