Bläddra i källkod

r.import: added title support (contributed by pmav99); sync'ed title msg in r.support

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67698 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 9 år sedan
förälder
incheckning
4f98d4b59d
2 ändrade filer med 11 tillägg och 2 borttagningar
  1. 1 1
      raster/r.support/main.c
  2. 10 1
      scripts/r.import/r.import.py

+ 1 - 1
raster/r.support/main.c

@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
     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";

+ 10 - 1
scripts/r.import/r.import.py

@@ -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 @@ def main():
     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 @@ def main():
     # 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