[GRASS-SVN] r67698 - in grass/trunk: raster/r.support scripts/r.import
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jan 28 12:28:42 PST 2016
Author: neteler
Date: 2016-01-28 12:28:42 -0800 (Thu, 28 Jan 2016)
New Revision: 67698
Modified:
grass/trunk/raster/r.support/main.c
grass/trunk/scripts/r.import/r.import.py
Log:
r.import: added title support (contributed by pmav99); sync'ed title msg in r.support
Modified: grass/trunk/raster/r.support/main.c
===================================================================
--- grass/trunk/raster/r.support/main.c 2016-01-28 19:04:08 UTC (rev 67697)
+++ grass/trunk/raster/r.support/main.c 2016-01-28 20:28:42 UTC (rev 67698)
@@ -64,7 +64,7 @@
title_opt->key_desc = "phrase";
title_opt->type = TYPE_STRING;
title_opt->required = NO;
- title_opt->description = _("Text to use for map title");
+ title_opt->description = _("Title for resultant raster map");
history_opt = G_define_option();
history_opt->key = "history";
Modified: grass/trunk/scripts/r.import/r.import.py
===================================================================
--- grass/trunk/scripts/r.import/r.import.py 2016-01-28 19:04:08 UTC (rev 67697)
+++ grass/trunk/scripts/r.import/r.import.py 2016-01-28 20:28:42 UTC (rev 67698)
@@ -89,6 +89,14 @@
#% description: Resolution of output raster map (use with option resolution=value)
#% guisection: Output
#%end
+#%option
+#% key: title
+#% key_desc: phrase
+#% type: string
+#% required: no
+#% description: Title for resultant raster map
+#% guisection: Metadata
+#%end
#%flag
#% key: e
#% description: Estimate resolution only
@@ -145,6 +153,7 @@
memory = options['memory']
bands = options['band']
tgtres = options['resolution']
+ title = options["title"]
if options['resolution_value']:
if tgtres != 'value':
grass.fatal(_("To set custom resolution value, select 'value' in resolution option"))
@@ -175,7 +184,7 @@
# create temp location from input without import
grass.verbose(_("Creating temporary location for <%s>...") % GDALdatasource)
parameters = dict(input=GDALdatasource, output=output,
- memory=memory, flags='c',
+ memory=memory, flags='c', title=title,
location=TMPLOC, quiet=True)
if bands:
parameters['band'] = bands
More information about the grass-commit
mailing list