[GRASS-SVN] r71226 - grass/branches/releasebranch_7_2/vector/v.lidar.growing
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 26 11:02:50 PDT 2017
Author: mmetz
Date: 2017-06-26 11:02:50 -0700 (Mon, 26 Jun 2017)
New Revision: 71226
Modified:
grass/branches/releasebranch_7_2/vector/v.lidar.growing/main.c
Log:
v.lidar.growing: fix wrong usage of Rast_easting_to_col()
Modified: grass/branches/releasebranch_7_2/vector/v.lidar.growing/main.c
===================================================================
--- grass/branches/releasebranch_7_2/vector/v.lidar.growing/main.c 2017-06-26 18:00:50 UTC (rev 71225)
+++ grass/branches/releasebranch_7_2/vector/v.lidar.growing/main.c 2017-06-26 18:02:50 UTC (rev 71226)
@@ -303,9 +303,13 @@
row =
(int)(Rast_northing_to_row
(points->y[0], &elaboration_reg));
+ /* do not use Rast_easting_to_col() because of possible ll wrap */
+ /*
col =
(int)(Rast_easting_to_col
(points->x[0], &elaboration_reg));
+ */
+ col = (points->x[0] - elaboration_reg.west) / elaboration_reg.ew_res;
Z_interp = 0;
/* TODO: make sure the current db_fetch() usage works */
@@ -419,9 +423,14 @@
row =
(int)(Rast_northing_to_row
(points_first->y[0], &elaboration_reg));
+
+ /* do not use Rast_easting_to_col() because of possible ll wrap */
+ /*
col =
(int)(Rast_easting_to_col
(points_first->x[0], &elaboration_reg));
+ */
+ col = (points_first->x[0] - elaboration_reg.west) / elaboration_reg.ew_res;
if (fabs
(points_first->z[0] - raster_matrix[row][col].orig) >=
@@ -528,9 +537,13 @@
row =
(int)(Rast_northing_to_row
(points->y[0], &elaboration_reg));
+ /* do not use Rast_easting_to_col() because of possible ll wrap */
+ /*
col =
(int)(Rast_easting_to_col
(points->x[0], &elaboration_reg));
+ */
+ col = (points->x[0] - elaboration_reg.west) / elaboration_reg.ew_res;
if (raster_matrix[row][col].clas == PRE_TERRAIN) {
if (raster_matrix[row][col].dueImp == SINGLE_PULSE)
More information about the grass-commit
mailing list