Explorar el Código

v.surf.rst: fix using standard mask and mask as option (merge from trunk, https://trac.osgeo.org/grass/changeset/62131)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@62132 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová hace 10 años
padre
commit
9a0e21672f
Se han modificado 2 ficheros con 5 adiciones y 5 borrados
  1. 3 4
      lib/rst/interp_float/input2d.c
  2. 2 1
      vector/v.surf.rst/v.surf.rst.html

+ 3 - 4
lib/rst/interp_float/input2d.c

@@ -61,7 +61,8 @@ struct BM *IL_create_bitmask(struct interp_params *params)
 	    if (MASK)
 		Rast_get_c_row(MASKfd, MASK, i);
 	    for (j = 0; j < params->nsizc; j++) {
-		if ((cellmask && cellmask[j] == 0) || (MASK && MASK[j] == 0))
+		if ((cellmask && (cellmask[j] == 0 || Rast_is_c_null_value(&cellmask[j]))) || 
+		    (MASK && (MASK[j] == 0 || Rast_is_c_null_value(&MASK[j]))))
 		    BM_set(bitmask, j, irev, 0);
 		else
 		    BM_set(bitmask, j, irev, 1);
@@ -71,9 +72,7 @@ struct BM *IL_create_bitmask(struct interp_params *params)
     }
     else
 	bitmask = NULL;
-    
-    if (MASKfd >= 0)
-	Rast_close(MASKfd);
+
     if (cfmask >= 0)
 	Rast_close(cfmask);
 

+ 2 - 1
vector/v.surf.rst/v.surf.rst.html

@@ -22,7 +22,8 @@ tangential and mean curvatures respectively. If the input vector map
 have time stamp, the program creates time stamp for all output maps.
 
 <p>
-User can define a raster map named <b>mask</b>, which will be used
+User can either use <em><a href="r.mask.html">r.mask</a></em>to set a mask
+or specify a raster map in <b>mask</b> option, which will be used
 as a mask. The approximation is skipped for cells which have zero or
 NULL value in mask. NULL values will be assigned to these cells in all
 output raster maps. Data points are checked for identical points and