[GRASS-SVN] r68484 - grass/trunk/raster/r.in.gdal

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 22 06:23:26 PDT 2016

Author: neteler
Date: 2016-05-22 06:23:26 -0700 (Sun, 22 May 2016)
New Revision: 68484

r.in.gdal: rephrase offset and num_digits parameter description; manual: explain offset and num_digits parameter, ECAD example updated

Modified: grass/trunk/raster/r.in.gdal/main.c
--- grass/trunk/raster/r.in.gdal/main.c	2016-05-22 10:30:26 UTC (rev 68483)
+++ grass/trunk/raster/r.in.gdal/main.c	2016-05-22 13:23:26 UTC (rev 68484)
@@ -138,7 +138,8 @@
     parm.offset->type = TYPE_INTEGER;
     parm.offset->required = NO;
     parm.offset->answer = "0";
-    parm.offset->description = _("The offset will be added to the band number while output raster map name creation");
+    parm.offset->label = _("Offset to be added to band numbers");
+    parm.offset->description = _("If 0, no offset is added and the first band is 1");
     parm.offset->guisection = _("Metadata");
     parm.num_digits = G_define_option();
@@ -146,7 +147,8 @@
     parm.num_digits->type = TYPE_INTEGER;
     parm.num_digits->required = NO;
     parm.num_digits->answer = "0";
-    parm.num_digits->description = _("Number of digits for the generated band number with leading 0's. If 0 the length will adjust to the band number.");
+    parm.num_digits->label = _("Zero-padding of band number by adding given number of leading zeros");
+    parm.num_digits->description = _("If 0, length will be adjusted to 'offset' number without leading zeros");
     parm.num_digits->guisection = _("Metadata");
     parm.map_names_file = G_define_standard_option(G_OPT_F_OUTPUT);

Modified: grass/trunk/raster/r.in.gdal/r.in.gdal.html
--- grass/trunk/raster/r.in.gdal/r.in.gdal.html	2016-05-22 10:30:26 UTC (rev 68483)
+++ grass/trunk/raster/r.in.gdal/r.in.gdal.html	2016-05-22 13:23:26 UTC (rev 68484)
@@ -121,6 +121,18 @@
 transformation is recommended, either before import with 
 <b>gdalwarp -tps</b> or after import with <b>i.rectify -t</b>.
+<h3>Map names: Management of offset and leading zeros</h3>
+The <b>offset</b> parameter allows adding an offset to band number(s) which
+is convenient in case of the import of e.g. a continuous time series split
+across different input files.
+The <b>num_digits</b> parameter allows defining the number of  leading zeros
+(zero padding) in case of band numbers (e.g., to turn <tt>band.1</tt> into
 Import of large files can be significantly faster when setting <b>memory</b> to
@@ -233,45 +245,51 @@
 <h3>ECAD Data</h3>
 The <a href="http://eca.knmi.nl/">European Climate Assessment and Dataset (ECAD) project</a> 
-provides climate data for Europe ranging from 1950 - 2010 or later. To import the different
-chunks of data provided by the project as netCDF files, the offset parameter can be used to get 
-daily numbered raster maps from 1. Jan. 1950 on. Make sure you are in a LatLong location.
+provides climate data for Europe ranging from 1950 - 2015 or later
+(<a href="http://eca.knmi.nl/download/ensembles/ensembles.php">Terms of use</a>).
+To import the different chunks of data provided by the project as netCDF files,
+the offset parameter can be used to properly assign numbers to the series
+of daily raster maps from 1st Jan 1950 (in case if importing the ECAD data
+split into multi-annual chunks). The ECAD data must be imported into a
+LatLong location.
-Use the <em>num_digits</em> option to allow chronological numbering of the imported raster map layers,
-so that <em>g.list</em> list's them in the correct import order. Use <em>num_digits=5</em>
-to have a 5 digit suffix with leading zeros (00001 - 99999).
+By using the <em>num_digits</em> parameter leading zeros are added to the
+map name numbers, allowing for chronological numbering of the imported raster
+map layers, so that <em>g.list</em> lists them in the correct order.
+Here, use <em>num_digits=5</em> to have a 5 digit suffix with leading zeros (00001 - 99999).
 <div class="code"><pre>
+# Import of ECAD data split into chunks
 # Import precipitation data
-r.in.gdal -o input=rr_0.25deg_reg_1950-1964_v4.0.nc output=precipitation num_digits=5 offset=0
-r.in.gdal -o input=rr_0.25deg_reg_1965-1979_v4.0.nc output=precipitation num_digits=5 offset=5479
-r.in.gdal -o input=rr_0.25deg_reg_1980-1994_v4.0.nc output=precipitation num_digits=5 offset=10957
-r.in.gdal -o input=rr_0.25deg_reg_1995-2010_v4.0.nc output=precipitation num_digits=5 offset=16436
+r.in.gdal -o input=rr_0.25deg_reg_1950-1964_v12.0.nc output=precipitation num_digits=5 offset=0
+r.in.gdal -o input=rr_0.25deg_reg_1965-1979_v12.0.nc output=precipitation num_digits=5 offset=5479
+r.in.gdal -o input=rr_0.25deg_reg_1980-1994_v12.0.nc output=precipitation num_digits=5 offset=10957
+r.in.gdal -o input=rr_0.25deg_reg_1995-2015_v12.0.nc output=precipitation num_digits=5 offset=16436
 # Import air pressure data
-r.in.gdal -o input=pp_0.25deg_reg_1950-1964_v4.0.nc output=air_pressure num_digits=5 offset=0
-r.in.gdal -o input=pp_0.25deg_reg_1965-1979_v4.0.nc output=air_pressure num_digits=5 offset=5479
-r.in.gdal -o input=pp_0.25deg_reg_1980-1994_v4.0.nc output=air_pressure num_digits=5 offset=10957
-r.in.gdal -o input=pp_0.25deg_reg_1995-2010_v4.0.nc output=air_pressure num_digits=5 offset=16436
+r.in.gdal -o input=pp_0.25deg_reg_1950-1964_v12.0.nc output=air_pressure num_digits=5 offset=0
+r.in.gdal -o input=pp_0.25deg_reg_1965-1979_v12.0.nc output=air_pressure num_digits=5 offset=5479
+r.in.gdal -o input=pp_0.25deg_reg_1980-1994_v12.0.nc output=air_pressure num_digits=5 offset=10957
+r.in.gdal -o input=pp_0.25deg_reg_1995-2015_v12.0.nc output=air_pressure num_digits=5 offset=16436
 # Import min temperature data
-r.in.gdal -o input=tn_0.25deg_reg_1950-1964_v4.0.nc output=temperatur_min num_digits=5 offset=0
-r.in.gdal -o input=tn_0.25deg_reg_1965-1979_v4.0.nc output=temperatur_min num_digits=5 offset=5479
-r.in.gdal -o input=tn_0.25deg_reg_1980-1994_v4.0.nc output=temperatur_min num_digits=5 offset=10957
-r.in.gdal -o input=tn_0.25deg_reg_1995-2010_v4.0.nc output=temperatur_min num_digits=5 offset=16436
+r.in.gdal -o input=tn_0.25deg_reg_1950-1964_v12.0.nc output=temperatur_min num_digits=5 offset=0
+r.in.gdal -o input=tn_0.25deg_reg_1965-1979_v12.0.nc output=temperatur_min num_digits=5 offset=5479
+r.in.gdal -o input=tn_0.25deg_reg_1980-1994_v12.0.nc output=temperatur_min num_digits=5 offset=10957
+r.in.gdal -o input=tn_0.25deg_reg_1995-2015_v12.0.nc output=temperatur_min num_digits=5 offset=16436
 # Import max temperature data
-r.in.gdal -o input=tx_0.25deg_reg_1950-1964_v4.0.nc output=temperatur_max num_digits=5 offset=0
-r.in.gdal -o input=tx_0.25deg_reg_1965-1979_v4.0.nc output=temperatur_max num_digits=5 offset=5479
-r.in.gdal -o input=tx_0.25deg_reg_1980-1994_v4.0.nc output=temperatur_max num_digits=5 offset=10957
-r.in.gdal -o input=tx_0.25deg_reg_1995-2010_v4.0.nc output=temperatur_max num_digits=5 offset=16436
+r.in.gdal -o input=tx_0.25deg_reg_1950-1964_v12.0.nc output=temperatur_max num_digits=5 offset=0
+r.in.gdal -o input=tx_0.25deg_reg_1965-1979_v12.0.nc output=temperatur_max num_digits=5 offset=5479
+r.in.gdal -o input=tx_0.25deg_reg_1980-1994_v12.0.nc output=temperatur_max num_digits=5 offset=10957
+r.in.gdal -o input=tx_0.25deg_reg_1995-2015_v12.0.nc output=temperatur_max num_digits=5 offset=16436
 # Import mean temperature data
-r.in.gdal -o input=tg_0.25deg_reg_1950-1964_v4.0.nc output=temperatur_mean num_digits=5 offset=0
-r.in.gdal -o input=tg_0.25deg_reg_1965-1979_v4.0.nc output=temperatur_mean num_digits=5 offset=5479
-r.in.gdal -o input=tg_0.25deg_reg_1980-1994_v4.0.nc output=temperatur_mean num_digits=5 offset=10957
-r.in.gdal -o input=tg_0.25deg_reg_1995-2010_v4.0.nc output=temperatur_mean num_digits=5 offset=16436
+r.in.gdal -o input=tg_0.25deg_reg_1950-1964_v12.0.nc output=temperatur_mean num_digits=5 offset=0
+r.in.gdal -o input=tg_0.25deg_reg_1965-1979_v12.0.nc output=temperatur_mean num_digits=5 offset=5479
+r.in.gdal -o input=tg_0.25deg_reg_1980-1994_v12.0.nc output=temperatur_mean num_digits=5 offset=10957
+r.in.gdal -o input=tg_0.25deg_reg_1995-2015_v12.0.nc output=temperatur_mean num_digits=5 offset=16436
@@ -331,13 +349,15 @@
 # ... likewise for other HDF bands in the file.
 <h2>SEE ALSO</h2>
 <a href="r.colors.html">r.colors</a>,
 <a href="r.import.html">r.import</a>,
 <a href="r.in.ascii.html">r.in.ascii</a>,
 <a href="r.in.bin.html">r.in.bin</a>,
-<a href="r.null.html">r.null</a>
+<a href="r.null.html">r.null</a>,
+<a href="t.register.html">t.register</a>

More information about the grass-commit mailing list