[GRASS-SVN] r50784 -
grass/branches/develbranch_6/scripts/r.fillnulls
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Feb 13 05:34:53 EST 2012
Author: hamish
Date: 2012-02-13 02:34:53 -0800 (Mon, 13 Feb 2012)
New Revision: 50784
Modified:
grass/branches/develbranch_6/scripts/r.fillnulls/r.fillnulls
Log:
use 3D points instead of writing to a table; use a better default for lambda_i
Modified: grass/branches/develbranch_6/scripts/r.fillnulls/r.fillnulls
===================================================================
--- grass/branches/develbranch_6/scripts/r.fillnulls/r.fillnulls 2012-02-13 09:48:04 UTC (rev 50783)
+++ grass/branches/develbranch_6/scripts/r.fillnulls/r.fillnulls 2012-02-13 10:34:53 UTC (rev 50784)
@@ -139,8 +139,8 @@
USERMASK="usermask_$MASKTMP"
eval `g.findfile element=cell file=MASK`
if [ "$file" ] ; then
- g.message "A user raster mask (MASK) is present. Saving it..."
- g.rename MASK,"$USERMASK" --quiet > /dev/null
+ g.message "A user raster mask (MASK) is present. Saving it..."
+ g.rename MASK,"$USERMASK" --quiet > /dev/null
fi
#make a mask of NULL cells
@@ -165,6 +165,7 @@
# check-me: quoting ok?
RES="`echo $nsres $ewres | awk '{printf "%f", ($1+$2) * 3. / 2.}'`" # avg*3
+# maybe use r.grow here..
r.buffer input="$TMP1" dist="$RES" out="$TMP1.buf"
if [ $? -ne 0 ] ; then
g.message -e "$0 abandoned. Removing temporary map, restoring user mask if needed:"
@@ -182,7 +183,8 @@
g.message "Creating interpolation points..."
## use the -b flag to avoid topology building on big jobs?
-r.to.vect input="$GIS_OPT_INPUT" output="$VECTTMP" feature=point
+## no, can't, 'g.region vect=' currently wants to see level 2
+r.to.vect -z input="$GIS_OPT_INPUT" output="$VECTTMP" feature=point
if [ $? -ne 0 ] ; then
g.message -e "$0 abandoned. Removing temporary maps, restoring user mask if needed:"
@@ -233,9 +235,9 @@
eval `g.findfile element=cell file=$USERMASK`
if [ "$file" ] ; then
g.message "Using user mask while interpolating"
- RST_CMD="v.surf.rst zcol=value tension=$GIS_OPT_TENSION smooth=$GIS_OPT_SMOOTH maskmap=$USERMASK"
+ RST_CMD="v.surf.rst -z layer=0 tension=$GIS_OPT_TENSION smooth=$GIS_OPT_SMOOTH maskmap=$USERMASK"
else
- RST_CMD="v.surf.rst zcol=value tension=$GIS_OPT_TENSION smooth=$GIS_OPT_SMOOTH"
+ RST_CMD="v.surf.rst -z layer=0 tension=$GIS_OPT_TENSION smooth=$GIS_OPT_SMOOTH"
fi
g.message "Note: The following warnings may be ignored."
@@ -277,8 +279,8 @@
SIE=`echo "$ewres" | awk '{printf "%f", $1 * 3.}'`
SIN=`echo "$nsres" | awk '{printf "%f", $1 * 3.}'`
- v.surf.bspline input="$VECTTMP" raster="${TMP1}_filled" layer=1 \
- method="$GIS_OPT_METHOD" column=value sie="$SIE" sin="$SIN"
+ v.surf.bspline input="$VECTTMP" raster="${TMP1}_filled" layer=0 \
+ method="$GIS_OPT_METHOD" sie="$SIE" sin="$SIN" lambda_i=0.005
fi
More information about the grass-commit
mailing list