[GRASS-SVN] r65260 - grass/trunk/raster/r.surf.idw

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 17 05:40:42 PDT 2015


Author: neteler
Date: 2015-05-17 05:40:42 -0700 (Sun, 17 May 2015)
New Revision: 65260

Modified:
   grass/trunk/raster/r.surf.idw/main.c
Log:
r.surf.idw: exit with fatal error in case of FCELL or DCELL input

Modified: grass/trunk/raster/r.surf.idw/main.c
===================================================================
--- grass/trunk/raster/r.surf.idw/main.c	2015-05-17 09:35:23 UTC (rev 65259)
+++ grass/trunk/raster/r.surf.idw/main.c	2015-05-17 12:40:42 UTC (rev 65260)
@@ -95,6 +95,7 @@
 	struct Flag *e;
     } flag;
     int n, fd, maskfd;
+    int cell_type;
 
     /* Initialize the GIS calls                                     */
     G_gisinit(argv[0]);
@@ -158,6 +159,10 @@
     /*  Open input cell layer for reading                           */
     fd = Rast_open_old(input, "");
 
+    cell_type = Rast_get_map_type(fd);
+    if (cell_type != CELL_TYPE)
+        G_fatal_error(_("This module currently only works for integer (CELL) maps"));
+
     /* Store input data in array-indexed doubly-linked lists and close input file */
     rowlist = row_lists(nrows, ncols, &datarows, &n, fd, cell);
     Rast_close(fd);



More information about the grass-commit mailing list