[GRASS-SVN] r50159 - in grass/trunk/raster: . r.series.interp
r.series.interp/test_suite
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jan 12 13:51:37 EST 2012
Author: huhabla
Date: 2012-01-12 10:51:37 -0800 (Thu, 12 Jan 2012)
New Revision: 50159
Added:
grass/trunk/raster/r.series.interp/
grass/trunk/raster/r.series.interp/r.series.interp.html
grass/trunk/raster/r.series.interp/test_suite/test.r.series.interp.sh
Removed:
grass/trunk/raster/r.series.interp/test_suite/test.r.series.interpol.sh
grass/trunk/raster/r.series.interpol/
Modified:
grass/trunk/raster/r.series.interp/Makefile
grass/trunk/raster/r.series.interp/main.c
Log:
Renamed r.series.interpol into r.series.interp
Modified: grass/trunk/raster/r.series.interp/Makefile
===================================================================
--- grass/trunk/raster/r.series.interpol/Makefile 2012-01-12 16:37:55 UTC (rev 50158)
+++ grass/trunk/raster/r.series.interp/Makefile 2012-01-12 18:51:37 UTC (rev 50159)
@@ -1,6 +1,6 @@
MODULE_TOPDIR = ../..
-PGM = r.series.interpol
+PGM = r.series.interp
LIBES = $(STATSLIB) $(RASTERLIB) $(GISLIB)
DEPENDENCIES = $(STATSDEP) $(RASTERDEP) $(GISDEP)
Modified: grass/trunk/raster/r.series.interp/main.c
===================================================================
--- grass/trunk/raster/r.series.interpol/main.c 2012-01-12 16:37:55 UTC (rev 50158)
+++ grass/trunk/raster/r.series.interp/main.c 2012-01-12 18:51:37 UTC (rev 50159)
@@ -1,7 +1,7 @@
/****************************************************************************
*
- * MODULE: r.series.interpol
+ * MODULE: r.series.interp
* AUTHOR(S): Soeren Gebbert <soerengebbert googlemail.com>
* Code is based on r.series from Glynn Clements <glynn gclements.plus.com>
*
Added: grass/trunk/raster/r.series.interp/r.series.interp.html
===================================================================
--- grass/trunk/raster/r.series.interp/r.series.interp.html (rev 0)
+++ grass/trunk/raster/r.series.interp/r.series.interp.html 2012-01-12 18:51:37 UTC (rev 50159)
@@ -0,0 +1,62 @@
+<h2>DESCRIPTION</h2>
+
+<em>r.series.interp</em>
+interpolates new raster maps located temporal or spatial in between existing raster maps.
+The interpolation is performed at specific sampling positions. The sampling position for each output map must be specified,
+as well as the data position of the input maps.
+
+The following interpolation methods are supported.
+<ul>
+ <li>linear: Linear interpolation. At least two input maps and data positions are required.
+ </ul>
+
+<h2>EXAMPLES</h2>
+<p>Interpolate linear three new maps at 3 sampling positions in the interval (0.0;1.0)
+
+First prepare the input maps:
+<br>
+<div class="code"><pre>
+g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
+
+r.mapcalc --o expr="prec_1 = 100"
+r.mapcalc --o expr="prec_5 = 500"
+</pre></div>
+
+<p>Interpolate
+
+<div class="code"><pre>
+r.series.interp --o --v input=prec_1,prec_5 datapos=0.0,1.0\
+ output=prec_2,prec_3,prec_4 sampoint=0.25,0.5,0.75\
+ method=linear
+</pre></div>
+
+<p>Interpolate using the file option.
+First prepare the input file:
+<br>
+<div class="code"><pre>
+cat > outfile.txt << EOF
+prec_2|0.25
+prec_3|0.5
+prec_4|0.75
+EOF
+</pre></div>
+
+<p>Interpolate:
+
+<div class="code"><pre>
+r.series.interp --o --v input=prec_1,prec_5 datapos=0.0,1.0 file=outfile.txt method=linear
+</pre></div>
+
+The resulting maps will have the values 200, 300 and 400.
+
+
+<h2>SEE ALSO</h2>
+
+<em><a href="r.series.html">r.series</a></em>
+<em><a href="g.region.html">g.region</a></em>
+
+<h2>AUTHOR</h2>
+
+Sören Gebbert
+
+<p><i>Last changed: $Date: 2011-12-28 15:26:22 +0100 (Mi, 28 Dez 2011) $</i>
Copied: grass/trunk/raster/r.series.interp/test_suite/test.r.series.interp.sh (from rev 50158, grass/trunk/raster/r.series.interpol/test_suite/test.r.series.interpol.sh)
===================================================================
--- grass/trunk/raster/r.series.interp/test_suite/test.r.series.interp.sh (rev 0)
+++ grass/trunk/raster/r.series.interp/test_suite/test.r.series.interp.sh 2012-01-12 18:51:37 UTC (rev 50159)
@@ -0,0 +1,56 @@
+# Test r.series.interp
+# We need to set a specific region in the
+# @preprocess step of this test. We generate
+# raster maps with r.mapcalc
+# The region setting should work for UTM and LL test locations
+g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
+
+r.mapcalc --o expr="prec_1 = 100"
+r.mapcalc --o expr="prec_5 = 500"
+
+r.mapcalc --o expr="map_10 = 10"
+r.mapcalc --o expr="map_20 = 20"
+r.mapcalc --o expr="map_30 = 30"
+r.mapcalc --o expr="map_40 = 40"
+
+# We create an input files containing empty lines.
+# However, r.series.interpol should process the
+# valid raster maps and positions listed in the files.
+
+# The first @test with map input and @precision=3
+r.series.interp --o --v input=prec_1,prec_5 datapos=0.0,1.0 output=prec_2,prec_3,prec_4 samplingpos=0.25,0.5,0.75 method=linear
+
+#r.out.ascii --o input=prec_2 output=test_1_prec_2.ref dp=3
+#r.out.ascii --o input=prec_3 output=test_1_prec_3.ref dp=3
+#r.out.ascii --o input=prec_4 output=test_1_prec_4.ref dp=3
+
+# The second @test with file input and @precision=3
+r.series.interp --o --v input=prec_1,prec_5 datapos=0.0,1.0 outfile=outfile_1.txt method=linear
+r.series.interp --o --v infile=infile_2.txt outfile=outfile_2.txt method=linear
+
+#r.out.ascii --o input=prec_2 output=test_2_prec_2.ref dp=3
+#r.out.ascii --o input=prec_3 output=test_2_prec_3.ref dp=3
+#r.out.ascii --o input=prec_4 output=test_2_prec_4.ref dp=3
+#r.out.ascii --o input=map_12 output=test_2_map_12.ref dp=3
+#r.out.ascii --o input=map_14 output=test_2_map_14.ref dp=3
+#r.out.ascii --o input=map_16 output=test_2_map_16.ref dp=3
+#r.out.ascii --o input=map_18 output=test_2_map_18.ref dp=3
+#r.out.ascii --o input=map_25 output=test_2_map_25.ref dp=3
+#r.out.ascii --o input=map_35 output=test_2_map_35.ref dp=3
+
+# We need @tests to check the @failure handling, as outputs, file and sampling points
+# are not handled by the grass parser
+# No outputs
+r.series.interp --o --v input=prec_1,prec_5 datapos=0.0,1.0 samplingpos=0.25,0.5,0.75
+# No sampling points
+r.series.interp --o --v input=prec_1,prec_5 datapos=0.0,1.0 output=prec_2,prec_3,prec_4
+# Output and file at once
+r.series.interp --o --v input=prec_1,prec_5 datapos=0.0,1.0 outfile=outfile_1.txt \
+ output=prec_2,prec_3,prec_4 samplingpos=0.25,0.5,0.75 method=linear
+# Sampling points and file at once
+r.series.interp --o --v input=prec_1,prec_5 datapos=0.0,1.0 outfile=outfile_1.txt samplingpos=0.25,0.5,0.75 method=linear
+# Wrong input file
+r.series.interp --o --v input=prec_1,prec_5 datapos=0.0,1.0 outfile=no_file_there method=linear
+# Corrupt input file
+r.series.interp --o --v input=prec_1,prec_5 datapos=0.0,1.0 outfile=outfile_corrupt.txt method=linear
+
Deleted: grass/trunk/raster/r.series.interp/test_suite/test.r.series.interpol.sh
===================================================================
--- grass/trunk/raster/r.series.interpol/test_suite/test.r.series.interpol.sh 2012-01-12 16:37:55 UTC (rev 50158)
+++ grass/trunk/raster/r.series.interp/test_suite/test.r.series.interpol.sh 2012-01-12 18:51:37 UTC (rev 50159)
@@ -1,56 +0,0 @@
-# Test r.series.interpol
-# We need to set a specific region in the
-# @preprocess step of this test. We generate
-# raster maps with r.mapcalc
-# The region setting should work for UTM and LL test locations
-g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
-
-r.mapcalc --o expr="prec_1 = 100"
-r.mapcalc --o expr="prec_5 = 500"
-
-r.mapcalc --o expr="map_10 = 10"
-r.mapcalc --o expr="map_20 = 20"
-r.mapcalc --o expr="map_30 = 30"
-r.mapcalc --o expr="map_40 = 40"
-
-# We create an input files containing empty lines.
-# However, r.series.interpol should process the
-# valid raster maps and positions listed in the files.
-
-# The first @test with map input and @precision=3
-r.series.interpol --o --v input=prec_1,prec_5 datapos=0.0,1.0 output=prec_2,prec_3,prec_4 samplingpos=0.25,0.5,0.75 method=linear
-
-#r.out.ascii --o input=prec_2 output=test_1_prec_2.ref dp=3
-#r.out.ascii --o input=prec_3 output=test_1_prec_3.ref dp=3
-#r.out.ascii --o input=prec_4 output=test_1_prec_4.ref dp=3
-
-# The second @test with file input and @precision=3
-r.series.interpol --o --v input=prec_1,prec_5 datapos=0.0,1.0 outfile=outfile_1.txt method=linear
-r.series.interpol --o --v infile=infile_2.txt outfile=outfile_2.txt method=linear
-
-#r.out.ascii --o input=prec_2 output=test_2_prec_2.ref dp=3
-#r.out.ascii --o input=prec_3 output=test_2_prec_3.ref dp=3
-#r.out.ascii --o input=prec_4 output=test_2_prec_4.ref dp=3
-#r.out.ascii --o input=map_12 output=test_2_map_12.ref dp=3
-#r.out.ascii --o input=map_14 output=test_2_map_14.ref dp=3
-#r.out.ascii --o input=map_16 output=test_2_map_16.ref dp=3
-#r.out.ascii --o input=map_18 output=test_2_map_18.ref dp=3
-#r.out.ascii --o input=map_25 output=test_2_map_25.ref dp=3
-#r.out.ascii --o input=map_35 output=test_2_map_35.ref dp=3
-
-# We need @tests to check the @failure handling, as outputs, file and sampling points
-# are not handled by the grass parser
-# No outputs
-r.series.interpol --o --v input=prec_1,prec_5 datapos=0.0,1.0 samplingpos=0.25,0.5,0.75
-# No sampling points
-r.series.interpol --o --v input=prec_1,prec_5 datapos=0.0,1.0 output=prec_2,prec_3,prec_4
-# Output and file at once
-r.series.interpol --o --v input=prec_1,prec_5 datapos=0.0,1.0 outfile=outfile_1.txt \
- output=prec_2,prec_3,prec_4 samplingpos=0.25,0.5,0.75 method=linear
-# Sampling points and file at once
-r.series.interpol --o --v input=prec_1,prec_5 datapos=0.0,1.0 outfile=outfile_1.txt samplingpos=0.25,0.5,0.75 method=linear
-# Wrong input file
-r.series.interpol --o --v input=prec_1,prec_5 datapos=0.0,1.0 outfile=no_file_there method=linear
-# Corrupt input file
-r.series.interpol --o --v input=prec_1,prec_5 datapos=0.0,1.0 outfile=outfile_corrupt.txt method=linear
-
More information about the grass-commit
mailing list