[GRASS-SVN] r43481 - grass/trunk/lib/lidar

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 16 12:09:27 EDT 2010


Author: mmetz
Date: 2010-09-16 16:09:27 +0000 (Thu, 16 Sep 2010)
New Revision: 43481

Modified:
   grass/trunk/lib/lidar/lidar.h
   grass/trunk/lib/lidar/raster.c
   grass/trunk/lib/lidar/zones.c
Log:
add masking option

Modified: grass/trunk/lib/lidar/lidar.h
===================================================================
--- grass/trunk/lib/lidar/lidar.h	2010-09-16 16:06:56 UTC (rev 43480)
+++ grass/trunk/lib/lidar/lidar.h	2010-09-16 16:09:27 UTC (rev 43481)
@@ -143,6 +143,7 @@
 			  struct bound_box, /**/
 			  struct bound_box, /**/
 			  double **, /**/
+			  char **, /**/
 			  double *, /**/
 			  double, /**/
 			  double, /**/

Modified: grass/trunk/lib/lidar/raster.c
===================================================================
--- grass/trunk/lib/lidar/raster.c	2010-09-16 16:06:56 UTC (rev 43480)
+++ grass/trunk/lib/lidar/raster.c	2010-09-16 16:09:27 UTC (rev 43481)
@@ -189,7 +189,7 @@
 /*------------------------------------------------------------------------------------------------*/
 double **P_Regular_Points(struct Cell_head *Elaboration, struct Cell_head *Original,
                           struct bound_box General, struct bound_box Overlap,
-			  double **matrix, double *param,
+			  double **matrix, char **mask_matrix, double *param,
 			  double passoN, double passoE, double overlap,
 			  double mean, int nsplx, int nsply,
 			  int nrows, int ncols, int bilin)
@@ -224,6 +224,12 @@
 
     for (row = startrow; row < endrow; row++) {
 	for (col = startcol; col < endcol; col++) {
+
+	    if (mask_matrix) {
+		if (!mask_matrix[row][col])
+		    continue;
+	    }
+
 	    X = Rast_col_to_easting((double)(col) + 0.5, Original);
 	    Y = Rast_row_to_northing((double)(row) + 0.5, Original);
 

Modified: grass/trunk/lib/lidar/zones.c
===================================================================
--- grass/trunk/lib/lidar/zones.c	2010-09-16 16:06:56 UTC (rev 43480)
+++ grass/trunk/lib/lidar/zones.c	2010-09-16 16:09:27 UTC (rev 43481)
@@ -547,7 +547,6 @@
 {
     int ncols, col, nrows, row;
     void *ptr, *raster;
-    struct Cell_head Original;
 
     nrows = Rast_window_rows();
     ncols = Rast_window_cols();



More information about the grass-commit mailing list