[GRASS-SVN] r58450 - grass/trunk/vector/v.out.ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 11 15:41:06 PST 2013


Author: martinl
Date: 2013-12-11 15:41:05 -0800 (Wed, 11 Dec 2013)
New Revision: 58450

Modified:
   grass/trunk/vector/v.out.ogr/args.c
   grass/trunk/vector/v.out.ogr/local_proto.h
   grass/trunk/vector/v.out.ogr/main.c
Log:
v.out.ogr: replace -p flag with `otype=boundary`


Modified: grass/trunk/vector/v.out.ogr/args.c
===================================================================
--- grass/trunk/vector/v.out.ogr/args.c	2013-12-11 23:33:42 UTC (rev 58449)
+++ grass/trunk/vector/v.out.ogr/args.c	2013-12-11 23:41:05 UTC (rev 58450)
@@ -28,7 +28,7 @@
     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 @@
 	_("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 @@
     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 =

Modified: grass/trunk/vector/v.out.ogr/local_proto.h
===================================================================
--- grass/trunk/vector/v.out.ogr/local_proto.h	2013-12-11 23:33:42 UTC (rev 58449)
+++ grass/trunk/vector/v.out.ogr/local_proto.h	2013-12-11 23:41:05 UTC (rev 58450)
@@ -16,7 +16,7 @@
 };
 
 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 */

Modified: grass/trunk/vector/v.out.ogr/main.c
===================================================================
--- grass/trunk/vector/v.out.ogr/main.c	2013-12-11 23:33:42 UTC (rev 58449)
+++ grass/trunk/vector/v.out.ogr/main.c	2013-12-11 23:41:05 UTC (rev 58450)
@@ -195,7 +195,7 @@
 	    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 @@
         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,



More information about the grass-commit mailing list