[GRASS-SVN] r42984 - in grass-addons/imagery/i.pr: PRLIB i.pr_classify

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 3 11:28:42 EDT 2010


Author: neteler
Date: 2010-08-03 15:28:42 +0000 (Tue, 03 Aug 2010)
New Revision: 42984

Modified:
   grass-addons/imagery/i.pr/PRLIB/training.c
   grass-addons/imagery/i.pr/i.pr_classify/main.c
Log:
Ant?\195?\179nio Rocha <antonio.rocha deimos.com.pt>: bugfixes

Modified: grass-addons/imagery/i.pr/PRLIB/training.c
===================================================================
--- grass-addons/imagery/i.pr/PRLIB/training.c	2010-08-03 13:30:08 UTC (rev 42983)
+++ grass-addons/imagery/i.pr/PRLIB/training.c	2010-08-03 15:28:42 UTC (rev 42984)
@@ -64,7 +64,8 @@
   training->file=file;
 
   line=GetLine(fp);
-  line=GetLine(fp);
+
+  /*line=GetLine(fp);*/
   
 
   if(strcmp(line,"GrassTraining") == 0){

Modified: grass-addons/imagery/i.pr/i.pr_classify/main.c
===================================================================
--- grass-addons/imagery/i.pr/i.pr_classify/main.c	2010-08-03 13:30:08 UTC (rev 42983)
+++ grass-addons/imagery/i.pr/i.pr_classify/main.c	2010-08-03 15:28:42 UTC (rev 42984)
@@ -226,7 +226,7 @@
   
   /*read first rows*/
   for(r=0;r<features.training.rows;r++){
-    rowbuf = (DCELL *)G_calloc(features.training.rows*cellhd.cols,sizeof(DCELL));
+    rowbuf = (DCELL *)G_calloc(features.training.nlayers*cellhd.cols,sizeof(DCELL));
     tf=rowbuf;
     for(l=0;l<features.training.nlayers;l++){
       if(G_get_d_raster_row(fd[l], tf, r)<0){
@@ -438,3 +438,4 @@
     return 0;
   }
 }
+



More information about the grass-commit mailing list