[GRASS-SVN] r61165 - grass/trunk/raster/r.reclass

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jul 7 03:24:30 PDT 2014


Author: hcho
Date: 2014-07-07 03:24:30 -0700 (Mon, 07 Jul 2014)
New Revision: 61165

Modified:
   grass/trunk/raster/r.reclass/reclass.c
Log:
r.reclass: Delete fp raster maps only

Modified: grass/trunk/raster/r.reclass/reclass.c
===================================================================
--- grass/trunk/raster/r.reclass/reclass.c	2014-07-07 10:24:00 UTC (rev 61164)
+++ grass/trunk/raster/r.reclass/reclass.c	2014-07-07 10:24:30 UTC (rev 61165)
@@ -227,15 +227,12 @@
 	_reclass(rules, cats, &new);
     }
 
-    if (G_find_file2("cell", new_name, G_mapset())) {
-	G_suppress_warnings(1);
-
+    if (G_find_file2("cell", new_name, G_mapset()) &&
+	Rast_map_type(new_name, G_mapset()) != CELL_TYPE) {
 	M_read_list(FALSE, NULL);
         if (M_do_remove(M_get_element("rast"), new_name) == 1)
 	    G_fatal_error(_("Cannot overwrite existing raster map <%s>"),
 			  new_name);
-
-	G_suppress_warnings(0);
     }
 
     if (Rast_put_reclass(new_name, &new) < 0)



More information about the grass-commit mailing list