[GRASS-SVN] r59737 - grass/trunk/lib/rst/interp_float
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Apr 15 05:16:49 PDT 2014
Author: mmetz
Date: 2014-04-15 05:16:49 -0700 (Tue, 15 Apr 2014)
New Revision: 59737
Modified:
grass/trunk/lib/rst/interp_float/input2d.c
grass/trunk/lib/rst/interp_float/resout2d.c
Log:
rstlib: fix mask and region (#1775)
Modified: grass/trunk/lib/rst/interp_float/input2d.c
===================================================================
--- grass/trunk/lib/rst/interp_float/input2d.c 2014-04-15 10:43:01 UTC (rev 59736)
+++ grass/trunk/lib/rst/interp_float/input2d.c 2014-04-15 12:16:49 UTC (rev 59737)
@@ -29,7 +29,7 @@
/** Creates a bitmap mask from given raster map **/
{
- int i, j, cfmask = 0, irev, MASKfd;
+ int i, j, cfmask = -1, irev, MASKfd;
const char *mapsetm;
CELL *cellmask, *MASK;
struct BM *bitmask;
@@ -71,6 +71,11 @@
}
else
bitmask = NULL;
+
+ if (MASKfd >= 0)
+ Rast_close(MASKfd);
+ if (cfmask >= 0)
+ Rast_close(cfmask);
return bitmask;
}
Modified: grass/trunk/lib/rst/interp_float/resout2d.c
===================================================================
--- grass/trunk/lib/rst/interp_float/resout2d.c 2014-04-15 10:43:01 UTC (rev 59736)
+++ grass/trunk/lib/rst/interp_float/resout2d.c 2014-04-15 12:16:49 UTC (rev 59737)
@@ -78,7 +78,7 @@
Rast_set_output_window(outhd);
mapset = G_mapset();
- cell1 = Rast_allocate_f_buf();
+ cell1 = Rast_allocate_f_output_buf();
if (params->elev)
cf1 = Rast_open_fp_new(params->elev);
More information about the grass-commit
mailing list