Browse Source

libgis: define new standardized option G_OPT_M_REGION

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58670 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 years ago
parent
commit
38775775b8
2 changed files with 12 additions and 1 deletions
  1. 1 0
      include/gis.h
  2. 11 1
      lib/gis/parser_standard_options.c

+ 1 - 0
include/gis.h

@@ -251,6 +251,7 @@ static const char *GRASS_copyright __attribute__ ((unused))
     G_OPT_M_COORDS,             /*!< coordinates */
     G_OPT_M_COLR,               /*!< color rules */
     G_OPT_M_DIR,                /*!< directory input */    
+    G_OPT_M_REGION,             /*!< saved region */
 
     G_OPT_STDS_INPUT,           /*!< old input space time dataset of type strds, str3ds or stvds */
     G_OPT_STDS_INPUTS,          /*!< old input space time datasets */

+ 11 - 1
lib/gis/parser_standard_options.c

@@ -93,12 +93,13 @@
    - G_OPT_C_BG
 
   - misc
+   - G_OPT_M_DIR
    - G_OPT_M_UNITS
    - G_OPT_M_DATATYPE
    - G_OPT_M_MAPSET
    - G_OPT_M_COORDS
    - G_OPT_M_COLR
-   - G_OPT_M_DIR
+   - G_OPT_M_REGION
 
   - temporal GIS framework
    - G_OPT_STDS_INPUT
@@ -633,6 +634,15 @@ struct Option *G_define_standard_option(int opt)
         Opt->gisprompt = "old,colortable,colortable";
 	break;
 
+    case G_OPT_M_REGION:
+        Opt->key = "region";
+        Opt->type = TYPE_STRING;
+        Opt->key_desc = "name";
+        Opt->required = NO;
+        Opt->gisprompt = "old,windows,region";
+        Opt->description = _("Name of saved region");
+        break;
+
     /* Spatio-temporal modules of the temporal GIS framework */
     case G_OPT_STDS_INPUT:
 	Opt->key = "input";