[GRASS-SVN] r31807 - grass/trunk/imagery/i.maxlik

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 22 19:40:37 EDT 2008


Author: glynn
Date: 2008-06-22 19:40:37 -0400 (Sun, 22 Jun 2008)
New Revision: 31807

Modified:
   grass/trunk/imagery/i.maxlik/classify.c
   grass/trunk/imagery/i.maxlik/global.h
   grass/trunk/imagery/i.maxlik/main.c
   grass/trunk/imagery/i.maxlik/open.c
Log:
Convert to FP


Modified: grass/trunk/imagery/i.maxlik/classify.c
===================================================================
--- grass/trunk/imagery/i.maxlik/classify.c	2008-06-22 23:40:12 UTC (rev 31806)
+++ grass/trunk/imagery/i.maxlik/classify.c	2008-06-22 23:40:37 UTC (rev 31807)
@@ -25,7 +25,7 @@
     {
 	valid_data = 0;
 	for (band = 0; band < nfiles; band++)
-	    if ((valid_data = !G_is_c_null_value(&cell[band][col])))
+	    if ((valid_data = !G_is_d_null_value(&cell[band][col])))
 		break;
 
 	if (!valid_data)	/* all nulls are classified as nulls */

Modified: grass/trunk/imagery/i.maxlik/global.h
===================================================================
--- grass/trunk/imagery/i.maxlik/global.h	2008-06-22 23:40:12 UTC (rev 31806)
+++ grass/trunk/imagery/i.maxlik/global.h	2008-06-22 23:40:37 UTC (rev 31807)
@@ -9,7 +9,7 @@
 GLOBAL char *sigfile;
 GLOBAL struct Ref Ref;
 GLOBAL struct Signature S;
-GLOBAL CELL **cell;
+GLOBAL DCELL **cell;
 GLOBAL int *cellfd;
 GLOBAL CELL *class_cell, *reject_cell;
 GLOBAL int class_fd, reject_fd;

Modified: grass/trunk/imagery/i.maxlik/main.c
===================================================================
--- grass/trunk/imagery/i.maxlik/main.c	2008-06-22 23:40:12 UTC (rev 31806)
+++ grass/trunk/imagery/i.maxlik/main.c	2008-06-22 23:40:37 UTC (rev 31807)
@@ -111,7 +111,7 @@
 	    G_percent(row, nrows, 2);
 
 	for (band = 0; band < Ref.nfiles; band++)
-	    if (G_get_c_raster_row (cellfd[band], cell[band], row) < 0) /*fixed 11/99*/
+	    if (G_get_d_raster_row (cellfd[band], cell[band], row) < 0) /*fixed 11/99*/
 		exit(EXIT_FAILURE);
 
 	classify(class_cell, reject_cell, ncols);

Modified: grass/trunk/imagery/i.maxlik/open.c
===================================================================
--- grass/trunk/imagery/i.maxlik/open.c	2008-06-22 23:40:12 UTC (rev 31806)
+++ grass/trunk/imagery/i.maxlik/open.c	2008-06-22 23:40:37 UTC (rev 31807)
@@ -31,12 +31,12 @@
                     "The subgroup must have at least 2 files."));
     }
 
-    cell = (CELL **) G_malloc (Ref.nfiles * sizeof (CELL *));
+    cell = (DCELL **) G_malloc (Ref.nfiles * sizeof (DCELL *));
     cellfd = (int *) G_malloc (Ref.nfiles * sizeof (int));
     P = (double *) G_malloc (Ref.nfiles * sizeof (double));
     for (n=0; n < Ref.nfiles; n++)
     {
-	cell[n] = G_allocate_cell_buf();
+	cell[n] = G_allocate_d_raster_buf();
 	name = Ref.file[n].name;
 	mapset = Ref.file[n].mapset;
 	if ((cellfd[n] = G_open_cell_old (name, mapset)) < 0)



More information about the grass-commit mailing list