[GRASS-SVN] r58930 - grass/branches/develbranch_6/raster/r.li/r.li.daemon
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 7 02:58:03 PST 2014
Author: hamish
Date: 2014-02-07 02:58:02 -0800 (Fri, 07 Feb 2014)
New Revision: 58930
Modified:
grass/branches/develbranch_6/raster/r.li/r.li.daemon/daemon.c
grass/branches/develbranch_6/raster/r.li/r.li.daemon/worker.c
Log:
fix mask mapset bug, disable too-brittle check for fully-qualified-name in the config file: the map name there doesn't always have an @mapset part
Modified: grass/branches/develbranch_6/raster/r.li/r.li.daemon/daemon.c
===================================================================
--- grass/branches/develbranch_6/raster/r.li/r.li.daemon/daemon.c 2014-02-07 10:40:45 UTC (rev 58929)
+++ grass/branches/develbranch_6/raster/r.li/r.li.daemon/daemon.c 2014-02-07 10:58:02 UTC (rev 58930)
@@ -316,7 +316,7 @@
{
struct stat s;
struct Cell_head cellhd;
- char *buf, *token, *raster_fqn, *mapset;
+ char *buf, *token, *mapset; /* *raster_fqn, */
int setup;
int letti;
double rel_x, rel_y, rel_rl, rel_cl;
@@ -349,7 +349,7 @@
/* find raster map */
mapset = G_find_cell(raster, "");
- raster_fqn = G_fully_qualified_name(raster, mapset);
+/* raster_fqn = G_fully_qualified_name(raster, mapset); */
if (G_get_cellhd(raster, mapset, &cellhd) == -1)
G_fatal_error(_("Cannot read raster header file"));
@@ -513,12 +513,12 @@
(strcmp(token, "MASKEDOVERLAYAREA") == 0));
if (strcmp(token, "RASTERMAP") != 0)
- G_fatal_error(_("Irregular maskedoverlay areas definition"));
+ G_fatal_error(_("Irregular MASKEDOVERLAY areas definition"));
token = strtok(NULL, "\n");
- if (strcmp(token, raster_fqn) != 0)
+/* if (strcmp(token, raster_fqn) != 0)
G_fatal_error(_("The configuration file can be used only with "
- "rasterfile <%s> and not with <%s>"), token, raster_fqn);
+ "rasterfile <%s> and not with <%s>"), token, raster_fqn); */
close(setup);
return NORMAL;
Modified: grass/branches/develbranch_6/raster/r.li/r.li.daemon/worker.c
===================================================================
--- grass/branches/develbranch_6/raster/r.li/r.li.daemon/worker.c 2014-02-07 10:40:45 UTC (rev 58929)
+++ grass/branches/develbranch_6/raster/r.li/r.li.daemon/worker.c 2014-02-07 10:58:02 UTC (rev 58930)
@@ -235,15 +235,16 @@
G_debug(3, "daemon mask preproc: raster=[%s] mask=[%s] rl=%d cl=%d",
raster, mask, rl, cl);
-/* BUG/TODO: mask variable already contains the @mapset, but it after this line switches to @PERMANENT */
-
/* mapset is used hold the mapset of input raster */
mapset = G_find_cell(raster, "");
+
/* open raster */
if (G_get_cellhd(raster, mapset, &cell) == -1)
return NULL;
+
mask_mapset = G_find_cell(mask, "");
+
/* open raster */
if (G_get_cellhd(mask, mask_mapset, &oldcell) == -1)
return NULL;
@@ -253,8 +254,10 @@
tmp_file = G_tempfile();
mask_fd = open(tmp_file, O_RDWR | O_CREAT, 0755);
- old_fd = G_open_cell_old(mask, mapset);
- G_debug(1,"worker.c: mask <%s@%s>", mask, mapset);
+
+ old_fd = G_open_cell_old(mask, mask_mapset);
+
+ G_debug(1, "worker.c: mask <%s@%s>", mask, mask_mapset);
old = G_allocate_cell_buf();
for (i = 0; i < rl; i++) {
More information about the grass-commit
mailing list