[GRASS-SVN] r33121 - grass/trunk/raster/r.external

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 27 13:00:55 EDT 2008


Author: glynn
Date: 2008-08-27 13:00:55 -0400 (Wed, 27 Aug 2008)
New Revision: 33121

Modified:
   grass/trunk/raster/r.external/main.c
Log:
Write f_quant file for FP maps


Modified: grass/trunk/raster/r.external/main.c
===================================================================
--- grass/trunk/raster/r.external/main.c	2008-08-27 13:58:19 UTC (rev 33120)
+++ grass/trunk/raster/r.external/main.c	2008-08-27 17:00:55 UTC (rev 33121)
@@ -399,7 +399,7 @@
     fclose(fp);
 }
 
-void write_fp_format(const char *output, const struct band_info *info)
+static void write_fp_format(const char *output, const struct band_info *info)
 {
     struct Key_Value *key_val;
     const char *type;
@@ -427,6 +427,16 @@
     G_free_key_value(key_val);
 }
 
+static void write_fp_quant(const char *output)
+{
+    struct Quant quant;
+
+    G_quant_round(&quant);
+
+    if (G_write_quant(output, G_mapset(), &quant) < 0)
+	G_warning(_("Unable to write quant file"));
+}
+
 static void create_map(const char *input, int band, const char *output,
 		       struct Cell_head *cellhd, struct band_info *info,
 		       const char *title)
@@ -451,6 +461,7 @@
 	fprange.max = info->range[1];
 	G_write_fp_range(output, &fprange);
 	write_fp_format(output, info);
+	write_fp_quant(output);
     }
 
     G_verbose_message(_("Creating support files for %s"), output);



More information about the grass-commit mailing list