[GRASS-SVN] r64274 - grass-addons/grass7/imagery/i.spec.sam
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 21 07:07:15 PST 2015
Author: ychemin
Date: 2015-01-21 07:07:14 -0800 (Wed, 21 Jan 2015)
New Revision: 64274
Modified:
grass-addons/grass7/imagery/i.spec.sam/main.c
grass-addons/grass7/imagery/i.spec.sam/open.c
Log:
Started conversion to GRASS GMath
Modified: grass-addons/grass7/imagery/i.spec.sam/main.c
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/main.c 2015-01-21 13:47:31 UTC (rev 64273)
+++ grass-addons/grass7/imagery/i.spec.sam/main.c 2015-01-21 15:07:14 UTC (rev 64274)
@@ -18,8 +18,9 @@
#include <stdio.h>
#include <strings.h>
#include <math.h>
-#include "grass/gis.h"
-#include "grass/raster.h"
+#include <grass/gis.h>
+#include <grass/raster.h>
+/*#include <grass/gmath.h>*/
#include "local_proto.h"
#include "global.h"
#include <meschach/matrix.h>
Modified: grass-addons/grass7/imagery/i.spec.sam/open.c
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/open.c 2015-01-21 13:47:31 UTC (rev 64273)
+++ grass-addons/grass7/imagery/i.spec.sam/open.c 2015-01-21 15:07:14 UTC (rev 64274)
@@ -19,6 +19,7 @@
#include <grass/gis.h>
#include <grass/raster.h>
#include <meschach/matrix.h>
+#include <grass/gmath.h>
int open_files()
{
@@ -33,6 +34,10 @@
G_fatal_error("ERROR: Matrixfile %s not found.\n",matrixfile);
A = m_finput(fp, MNULL);
fclose (fp);
+
+ /*IF GRASS/GMATH.H
+ if(A->rows < A->cols)
+ */
if ( A->m < A->n )
G_fatal_error("Need m (rows) >= n (cols) to obtain least squares fit\n");
G_verbose_message("Your spectral matrix = ");
@@ -41,7 +46,9 @@
m_output(A);
}
matrixsize = A->n;
-
+ /*IF GRASS/GMATH.H
+ matrixsize=A->cols;
+ */
/* open input files from group */
if (!I_find_group(group))
{
More information about the grass-commit
mailing list