[GRASS-SVN] r65263 - grass-addons/grass7/raster/r.surf.idw2

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 17 10:35:11 PDT 2015


Author: neteler
Date: 2015-05-17 10:35:11 -0700 (Sun, 17 May 2015)
New Revision: 65263

Modified:
   grass-addons/grass7/raster/r.surf.idw2/main.c
   grass-addons/grass7/raster/r.surf.idw2/r.surf.idw2.html
Log:
r.surf.idw2 Addon: tell user about integer-only (CELL) support limit

Modified: grass-addons/grass7/raster/r.surf.idw2/main.c
===================================================================
--- grass-addons/grass7/raster/r.surf.idw2/main.c	2015-05-17 17:24:47 UTC (rev 65262)
+++ grass-addons/grass7/raster/r.surf.idw2/main.c	2015-05-17 17:35:11 UTC (rev 65263)
@@ -54,6 +54,7 @@
     {
 	struct Option *input, *npoints, *output;
     } parm;
+    int cell_type;
 
     G_gisinit(argv[0]);
 
@@ -62,7 +63,8 @@
     G_add_keyword(_("surface"));
     G_add_keyword(_("interpolation"));
     G_add_keyword(_("IDW"));
-    module->description = _("Surface generation program.");
+    module->description =
+	_("Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.");
 
     parm.input = G_define_standard_option(G_OPT_R_INPUT);
 
@@ -109,6 +111,10 @@
 
     fd = Rast_open_c_new(parm.output->answer);
 
+    cell_type = Rast_get_map_type(fd);
+    if (cell_type != CELL_TYPE)
+        G_fatal_error(_("This module currently only works for integer (CELL) maps"));
+
     G_message(_n("Interpolating raster map <%s>... %d row... ",
         "Interpolating raster map <%s>... %d rows... ", window.rows),
 	      parm.output->answer, window.rows);

Modified: grass-addons/grass7/raster/r.surf.idw2/r.surf.idw2.html
===================================================================
--- grass-addons/grass7/raster/r.surf.idw2/r.surf.idw2.html	2015-05-17 17:24:47 UTC (rev 65262)
+++ grass-addons/grass7/raster/r.surf.idw2/r.surf.idw2.html	2015-05-17 17:35:11 UTC (rev 65263)
@@ -48,6 +48,10 @@
 <em><a href="v.surf.rst.html">v.surf.rst</a></em> <br>to
 compare this surface generation program with others available in GRASS.
 
+
+<h2>KNOWN ISSUES</h2>
+Module <em>r.surf.idw</em> works only for integer (CELL) raster maps.
+
 <h2>SEE ALSO</h2>
 
 <em><a href="r.surf.contour.html">r.surf.contour</a></em>,



More information about the grass-commit mailing list