Ver código fonte

r.out.gdal/v.out.ogr: format required + cosmetics in guisections

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@45183 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 anos atrás
pai
commit
9747380e64
2 arquivos alterados com 12 adições e 11 exclusões
  1. 10 8
      raster/r.out.gdal/main.c
  2. 2 3
      vector/v.out.ogr/args.c

+ 10 - 8
raster/r.out.gdal/main.c

@@ -139,6 +139,7 @@ int main(int argc, char *argv[])
     flag_c->key = 'c';
     flag_c->key = 'c';
     flag_c->label = _("Do not write GDAL standard colortable");
     flag_c->label = _("Do not write GDAL standard colortable");
     flag_c->description = _("Only applicable to Byte or UInt16 data types.");
     flag_c->description = _("Only applicable to Byte or UInt16 data types.");
+    flag_c->guisection = _("Creation");
 
 
     flag_f = G_define_flag();
     flag_f = G_define_flag();
     flag_f->key = 'f';
     flag_f->key = 'f';
@@ -155,7 +156,7 @@ int main(int argc, char *argv[])
     format->key = "format";
     format->key = "format";
     format->type = TYPE_STRING;
     format->type = TYPE_STRING;
     format->description =
     format->description =
-	_("GIS format to write (case sensitive, see also -l flag)");
+	_("Raster data format to write (case sensitive, see also -l flag)");
 
 
 #ifdef __ALLOW_DYNAMIC_OPTIONS__
 #ifdef __ALLOW_DYNAMIC_OPTIONS__
     /* Init GDAL */
     /* Init GDAL */
@@ -171,18 +172,17 @@ int main(int argc, char *argv[])
     format->options = gdal_formats;
     format->options = gdal_formats;
 #endif
 #endif
     format->answer = "GTiff";
     format->answer = "GTiff";
-    format->required = NO;
-    format->guisection = _("Format");
+    format->required = YES;
     
     
     type = G_define_option();
     type = G_define_option();
     type->key = "type";
     type->key = "type";
     type->type = TYPE_STRING;
     type->type = TYPE_STRING;
-    type->description = _("File type");
+    type->description = _("Data type");
     type->options =
     type->options =
 	"Byte,Int16,UInt16,Int32,UInt32,Float32,Float64,CInt16,CInt32,CFloat32,CFloat64";
 	"Byte,Int16,UInt16,Int32,UInt32,Float32,Float64,CInt16,CInt32,CFloat32,CFloat64";
     type->required = NO;
     type->required = NO;
-    type->guisection = _("Format");
-
+    type->guisection = _("Creation");
+ 
     createopt = G_define_option();
     createopt = G_define_option();
     createopt->key = "createopt";
     createopt->key = "createopt";
     createopt->type = TYPE_STRING;
     createopt->type = TYPE_STRING;
@@ -192,6 +192,7 @@ int main(int argc, char *argv[])
 	_("In the form of \"NAME=VALUE\", separate multiple entries with a comma.");
 	_("In the form of \"NAME=VALUE\", separate multiple entries with a comma.");
     createopt->multiple = YES;
     createopt->multiple = YES;
     createopt->required = NO;
     createopt->required = NO;
+    createopt->guisection = _("Creation");
 
 
     metaopt = G_define_option();
     metaopt = G_define_option();
     metaopt->key = "metaopt";
     metaopt->key = "metaopt";
@@ -202,6 +203,7 @@ int main(int argc, char *argv[])
 	  "with a comma. Not supported by all output format drivers.");
 	  "with a comma. Not supported by all output format drivers.");
     metaopt->multiple = YES;
     metaopt->multiple = YES;
     metaopt->required = NO;
     metaopt->required = NO;
+    metaopt->guisection = _("Creation");
 
 
     nodataopt = G_define_option();
     nodataopt = G_define_option();
     nodataopt->key = "nodata";
     nodataopt->key = "nodata";
@@ -210,8 +212,8 @@ int main(int argc, char *argv[])
 	_("Assign a specified nodata value to output bands");
 	_("Assign a specified nodata value to output bands");
     nodataopt->multiple = NO;
     nodataopt->multiple = NO;
     nodataopt->required = NO;
     nodataopt->required = NO;
-
-
+    nodataopt->guisection = _("Creation");
+    
     if (G_parser(argc, argv))
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
 
 

+ 2 - 3
vector/v.out.ogr/args.c

@@ -46,9 +46,8 @@ void parse_args(int argc, char **argv,
     options->format->multiple = NO;
     options->format->multiple = NO;
     options->format->answer = "ESRI_Shapefile";
     options->format->answer = "ESRI_Shapefile";
     options->format->options = OGR_list_write_drivers();
     options->format->options = OGR_list_write_drivers();
-    options->format->description = _("OGR data format");
-    options->format->guisection = _("Creation");
-
+    options->format->description = _("Vector data format to write");
+    
     options->dsco = G_define_option();
     options->dsco = G_define_option();
     options->dsco->key = "dsco";
     options->dsco->key = "dsco";
     options->dsco->type = TYPE_STRING;
     options->dsco->type = TYPE_STRING;