Browse Source

reorganizing lidar tools: update headers

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42316 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 15 years ago
parent
commit
490c0619b9

+ 1 - 2
vector/lidar/lidarlib/InterpSpline.c

@@ -22,8 +22,7 @@
 #include <float.h>
 #include <math.h>
 #include <string.h>
-
-#include "PolimiFunct.h"
+#include <grass/lidar.h>
 
 /*----------------------------------------------------------------------------*/
 /* Abscissa node index computation */

+ 4 - 3
vector/lidar/lidarlib/Makefile

@@ -8,7 +8,8 @@ LIB = LIDAR
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 
-default: $(ARCH_INCDIR)/PolimiFunct.h lib
+default: $(ARCH_INCDIR)/lidar.h
+	$(MAKE) lib
 
-$(ARCH_INCDIR)/PolimiFunct.h: PolimiFunct.h
-	cp PolimiFunct.h $(ARCH_INCDIR)/PolimiFunct.h
+$(ARCH_INCDIR)/lidar.h: lidar.h
+	$(INSTALL_DATA) lidar.h $(ARCH_INCDIR)/lidar.h

+ 2 - 2
vector/lidar/lidarlib/PolimiFunct.h

@@ -20,12 +20,12 @@
 #ifndef _POLIMIFUNCT_H_
 #define _POLIMIFUNCT_H_
 
-#include <grass/config.h>
 #include <grass/gis.h>
+#include <grass/gmath.h>
 #include <grass/vector.h>
 #include <grass/dbmi.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
-#include <grass/gmath.h>
 
 /*----------------------------------------------------------------------------------------------------------*/
 /*CONSTANTS DECLARATION */

+ 2 - 9
vector/lidar/lidarlib/raster.c

@@ -1,15 +1,8 @@
+#include <grass/config.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-
-#include <grass/gis.h>
-#include <grass/raster.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-#include <grass/glocale.h>
-#include <grass/config.h>
-
-#include "PolimiFunct.h"
+#include <grass/lidar.h>
 
 /*------------------------------------------------------------------------------------------------*/
 void

+ 2 - 9
vector/lidar/lidarlib/zones.c

@@ -1,15 +1,8 @@
+#include <grass/config.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-
-#include <grass/gis.h>
-#include <grass/raster.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-#include <grass/glocale.h>
-#include <grass/config.h>
-
-#include "PolimiFunct.h"
+#include <grass/lidar.h>
 
 /*----------------------------------------------------------------------------------------*/
 void P_zero_dim(struct Reg_dimens *dim)

+ 1 - 9
vector/lidar/r.resamp.bspline/bspline.h

@@ -18,15 +18,7 @@
  **************************************************************************/
 
  /*INCLUDES*/
-#include <stdlib.h>
-#include <string.h>
-#include <grass/gis.h>
-#include <grass/raster.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-#include <grass/glocale.h>
-#include <grass/config.h>
-#include <grass/PolimiFunct.h>
+#include <grass/lidar.h>
      /*STRUCTURES*/ struct Stats
 {
     double *estima;

+ 5 - 8
vector/lidar/r.resamp.bspline/crosscorr.c

@@ -1,9 +1,10 @@
 
 /***********************************************************************
  *
- * MODULE:       v.surf.bspline
+ * MODULE:       r.resamp.bspline
  *
- * AUTHOR(S):    Roberto Antolin
+ * AUTHOR(S):    Roberto Antolin (v.surf.bspline)
+ *               Markus Metz (adapted for r.resamp.bspline)
  *
  * PURPOSE:      Spline Interpolation and cross correlation
  *
@@ -18,16 +19,12 @@
  **************************************************************************/
 
  /*INCLUDES*/
+#include <grass/config.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <grass/gis.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-#include <grass/glocale.h>
-#include <grass/config.h>
-#include <grass/PolimiFunct.h>
 #include "bspline.h"
+
 #define NDATA_MAX 100
 #define PARAM_LAMBDA 6
 #define PARAM_SPLINE 0

+ 1 - 7
vector/lidar/r.resamp.bspline/main.c

@@ -17,16 +17,10 @@
  **********************************************************************/
 
 /* INCLUDES */
+#include <grass/config.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <grass/gis.h>
-#include <grass/raster.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-#include <grass/glocale.h>
-#include <grass/config.h>
-#include <grass/PolimiFunct.h>
 #include "bspline.h"
 
 /*--------------------------------------------------------------------*/

+ 4 - 0
vector/lidar/r.resamp.bspline/resamp.c

@@ -16,6 +16,10 @@
  *
  **************************************************************************/
 
+#include <grass/config.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
 #include "bspline.h"
 
 struct Point *P_Read_Raster_Region_Nulls(double **matrix,

+ 18 - 21
vector/lidar/v.lidar.correction/correction.c

@@ -1,30 +1,27 @@
 
-/**************************************************************
- *									*
- * MODULE:       v.lidar.correction					*
- * 									*
- * AUTHOR(S):    Roberto Antolin & Gonzalo Moreno			*
- *               							*
- * PURPOSE:      Correction of the v.growing output			*
- *               							*
- * COPYRIGHT:    (C) 2006 by Politecnico di Milano - 			*
- *			     Polo Regionale di Como			*
- *									*
- *               This program is free software under the 		*
- *               GNU General Public License (>=v2). 			*
- *               Read the file COPYING that comes with GRASS		*
- *               for details.						*
- *									*
- **************************************************************/
+/********************************************************************
+ *								    *
+ * MODULE:       v.lidar.correction				    *
+ * 								    *
+ * AUTHOR(S):    Roberto Antolin & Gonzalo Moreno                   *
+ *               general update Markus Metz      		    *
+ *               						    *
+ * PURPOSE:      Correction of the v.growing output		    *
+ *               						    *
+ * COPYRIGHT:    (C) 2006 by Politecnico di Milano - 		    *
+ *			     Polo Regionale di Como		    *
+ *								    *
+ *               This program is free software under the 	    *
+ *               GNU General Public License (>=v2). 		    *
+ *               Read the file COPYING that comes with GRASS	    *
+ *               for details.					    *
+ *								    *
+ ********************************************************************/
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <grass/gis.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-
 #include "correction.h"
 
 void

+ 2 - 2
vector/lidar/v.lidar.correction/correction.h

@@ -3,9 +3,9 @@
 #include <grass/gis.h>
 #include <grass/vector.h>
 #include <grass/dbmi.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
-
-#include <grass/PolimiFunct.h>
+#include <grass/lidar.h>
 
 struct lidar_cat
 {

+ 19 - 24
vector/lidar/v.lidar.correction/main.c

@@ -1,33 +1,28 @@
 
-/**************************************************************
- *									*
- * MODULE:       v.lidar.correction					*
- * 									*
- * AUTHOR(S):    Roberto Antolin & Gonzalo Moreno			*
- *               							*
- * PURPOSE:      Correction of the v.growing output			*
- *               							*
- * COPYRIGHT:    (C) 2005 by Politecnico di Milano - 			*
- *			     Polo Regionale di Como			*
- *									*
- *               This program is free software under the 		*
- *               GNU General Public License (>=v2). 			*
- *               Read the file COPYING that comes with GRASS		*
- *               for details.						*
- *									*
- **************************************************************/
+/********************************************************************
+ *								    *
+ * MODULE:       v.lidar.correction				    *
+ * 								    *
+ * AUTHOR(S):    Roberto Antolin & Gonzalo Moreno                   *
+ *               general update Markus Metz      		    *
+ *               						    *
+ * PURPOSE:      Correction of the v.growing output		    *
+ *               						    *
+ * COPYRIGHT:    (C) 2005 by Politecnico di Milano - 		    *
+ *			     Polo Regionale di Como		    *
+ *								    *
+ *               This program is free software under the 	    *
+ *               GNU General Public License (>=v2). 		    *
+ *               Read the file COPYING that comes with GRASS	    *
+ *               for details.					    *
+ *								    *
+ ********************************************************************/
 
  /*INCLUDES*/
+#include <grass/config.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <grass/config.h>
-#include <grass/gis.h>
-#include <grass/vector.h>
-#include <grass/raster.h>
-#include <grass/dbmi.h>
-#include <grass/glocale.h>
-#include <grass/PolimiFunct.h>
 #include "correction.h"
 
 /*----------------------------------------------------------------------------------------------------------*/

+ 0 - 5
vector/lidar/v.lidar.edgedetection/edgedetection.c

@@ -27,11 +27,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <grass/gis.h>
-#include <grass/raster.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-    /* #include <grass/PolimiFunct.h> */
 #include "edgedetection.h"
 
 int edge_detection(struct Cell_head elaboration_reg, struct bound_box Overlap_Box,

+ 2 - 1
vector/lidar/v.lidar.edgedetection/edgedetection.h

@@ -26,8 +26,9 @@
 #include <grass/gis.h>
 #include <grass/vector.h>
 #include <grass/dbmi.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
-#include <grass/PolimiFunct.h>
+#include <grass/lidar.h>
 
 /*---------------------------------------------------------------------------------------*/
 int edge_detection(struct Cell_head, /**/

+ 1 - 6
vector/lidar/v.lidar.edgedetection/main.c

@@ -23,15 +23,10 @@
  **************************************************************/
 
  /*INCLUDES*/
+#include <grass/config.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <grass/gis.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-#include <grass/glocale.h>
-#include <grass/config.h>
-#include <grass/PolimiFunct.h>
 #include "edgedetection.h"
 
 int nsply, nsplx, line_out_counter;

+ 1 - 1
vector/lidar/v.lidar.growing/ConvexHull.c

@@ -1,7 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <grass/gis.h>
+#include <assert.h>
 
 #include "growing.h"
 

+ 0 - 3
vector/lidar/v.lidar.growing/growing.c

@@ -1,9 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-
 #include "growing.h"
 
 void P_Aux_to_Coor(struct Map_info *In, struct Map_info *Out,

+ 2 - 3
vector/lidar/v.lidar.growing/growing.h

@@ -1,10 +1,9 @@
-#include <assert.h>
-
 #include <grass/gis.h>
 #include <grass/vector.h>
 #include <grass/dbmi.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
-#include <grass/PolimiFunct.h>
+#include <grass/lidar.h>
 
 /*--------------------------------------------------------------------------*/
 /* Definitions for Convex-Hull algorithm */

+ 2 - 6
vector/lidar/v.lidar.growing/main.c

@@ -20,16 +20,12 @@
  ****************************************************************/
 
  /*INCLUDES*/
+#include <grass/config.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <grass/config.h>
-#include <grass/gis.h>
-#include <grass/vector.h>
-#include <grass/raster.h>
-#include <grass/dbmi.h>
-#include <grass/glocale.h>
 #include "growing.h"
+
     /* GLOBAL DEFINITIONS */
 int nsply, nsplx, count_obj;
 double stepN, stepE;

+ 2 - 6
vector/lidar/v.outlier/main.c

@@ -18,16 +18,12 @@
  ************************************************************************/
 
  /*INCLUDES*/
+#include <grass/config.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <grass/config.h>
-#include <grass/gis.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-#include <grass/glocale.h>
-#include <grass/PolimiFunct.h>
 #include "outlier.h"
+
     /* GLOBAL VARIABLES DEFINITIONS */
 int nsply, nsplx;
 double stepN, stepE, Thres_Outlier;

+ 0 - 4
vector/lidar/v.outlier/outlier.c

@@ -2,10 +2,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <grass/gis.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-
 #include "outlier.h"
 
 extern double Thres_Outlier;

+ 1 - 2
vector/lidar/v.outlier/outlier.h

@@ -2,8 +2,7 @@
 #include <grass/vector.h>
 #include <grass/dbmi.h>
 #include <grass/glocale.h>
-
-#include <grass/PolimiFunct.h>
+#include <grass/lidar.h>
 
 /*--------------------------------------------------------------------------*/
 /*FUNCTIONS DECLARATION */

+ 5 - 5
vector/lidar/v.surf.bspline/bspline.h

@@ -18,15 +18,15 @@
  **************************************************************************/
 
  /*INCLUDES*/
-#include <stdlib.h>
-#include <string.h>
 #include <grass/gis.h>
 #include <grass/vector.h>
 #include <grass/dbmi.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
-#include <grass/config.h>
-#include <grass/PolimiFunct.h>
-     /*STRUCTURES*/ struct Stats
+#include <grass/lidar.h>
+
+/*STRUCTURES*/
+struct Stats
 {
     double *estima;
     double *error;

+ 2 - 6
vector/lidar/v.surf.bspline/crosscorr.c

@@ -18,16 +18,12 @@
  **************************************************************************/
 
  /*INCLUDES*/
+#include <grass/config.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <grass/gis.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-#include <grass/glocale.h>
-#include <grass/config.h>
-#include <grass/PolimiFunct.h>
 #include "bspline.h"
+
 #define NDATA_MAX 100
 #define PARAM_LAMBDA 6
 #define PARAM_SPLINE 0

+ 1 - 7
vector/lidar/v.surf.bspline/main.c

@@ -19,16 +19,10 @@
  **********************************************************************/
 
 /* INCLUDES */
+#include <grass/config.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <grass/gis.h>
-#include <grass/raster.h>
-#include <grass/vector.h>
-#include <grass/dbmi.h>
-#include <grass/glocale.h>
-#include <grass/config.h>
-#include <grass/PolimiFunct.h>
 #include "bspline.h"
 
 /* GLOBAL VARIABLES */