[GRASS-SVN] r71229 - grass/trunk/vector/v.lidar.growing
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 26 11:09:08 PDT 2017
Author: mmetz
Date: 2017-06-26 11:09:08 -0700 (Mon, 26 Jun 2017)
New Revision: 71229
Modified:
grass/trunk/vector/v.lidar.growing/main.c
Log:
v.lidar.growing: fix inappropriate usage of Rast_easting_to_col()
Modified: grass/trunk/vector/v.lidar.growing/main.c
===================================================================
--- grass/trunk/vector/v.lidar.growing/main.c 2017-06-26 18:07:54 UTC (rev 71228)
+++ grass/trunk/vector/v.lidar.growing/main.c 2017-06-26 18:09:08 UTC (rev 71229)
@@ -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