Переглянути джерело

v.out.ogr: replace -p flag with `otype=boundary`

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58450 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 роки тому
батько
коміт
3b1bcc6bad
3 змінених файлів з 5 додано та 10 видалено
  1. 2 7
      vector/v.out.ogr/args.c
  2. 1 1
      vector/v.out.ogr/local_proto.h
  3. 2 2
      vector/v.out.ogr/main.c

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

@@ -28,7 +28,7 @@ void parse_args(int argc, char **argv,
     options->dsn->label = _("Name of output OGR datasource");
     options->dsn->description =
 	_("For example: ESRI Shapefile: filename or directory for storage\n"
-          "\tPostGIS database: connection string");
+          "\t\t\tPostGIS database: connection string");
 
     options->format = G_define_option();
     options->format->key = "format";
@@ -47,7 +47,7 @@ void parse_args(int argc, char **argv,
 	_("Name for output OGR layer. If not specified, input name is used");
     options->layer->description =
 	_("For example: ESRI Shapefile: shapefile name\n"
-          "\tPostGIS database: table name");
+          "\t\t\tPostGIS database: table name");
     options->layer->guisection = _("Creation");
 
     options->otype = G_define_standard_option(G_OPT_V_TYPE);
@@ -115,11 +115,6 @@ void parse_args(int argc, char **argv,
     flags->force2d->description = _("Useful if input is 3D but all z coordinates are identical");
     flags->force2d->guisection = _("Creation");
 
-    flags->poly = G_define_flag();
-    flags->poly->key = 'p';
-    flags->poly->description = _("Export lines as polygons");
-    flags->poly->guisection = _("Creation");
-
     flags->multi = G_define_flag();
     flags->multi->key = 'm';
     flags->multi->description =

+ 1 - 1
vector/v.out.ogr/local_proto.h

@@ -16,7 +16,7 @@ struct Options {
 };
 
 struct Flags {
-    struct Flag *cat, *esristyle, *poly, *update, *nocat, *new, *append, *force2d, *multi;
+    struct Flag *cat, *esristyle, *update, *nocat, *new, *append, *force2d, *multi;
 };
 
 /* args.c */

+ 2 - 2
vector/v.out.ogr/main.c

@@ -195,7 +195,7 @@ int main(int argc, char *argv[])
 	    options.layer->answer = G_store(options.input->answer);
     }
 
-    if (flags.poly->answer) {
+    if (ftype == GV_BOUNDARY) {
         if (!flags.multi->answer)
             wkbtype = wkbPolygon;
         else
@@ -668,7 +668,7 @@ int main(int argc, char *argv[])
         G_message(_("Exporting %d features..."), Vect_get_num_primitives(&In, otype));
 
         n_feat += export_lines(&In, field, otype, flags.multi->answer ? TRUE : FALSE,
-                               donocat, flags.poly->answer ? TRUE : FALSE,
+                               donocat, ftype == GV_BOUNDARY ? TRUE : FALSE,
                                Ogr_featuredefn, Ogr_layer,
                                Fi, Driver, ncol, colctype, 
                                colname, doatt, flags.nocat->answer ? TRUE : FALSE,