[GRASS-SVN] r70975 - grass/trunk/vector/v.out.postgis
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Apr 28 03:34:31 PDT 2017
Author: martinl
Date: 2017-04-28 03:34:31 -0700 (Fri, 28 Apr 2017)
New Revision: 70975
Modified:
grass/trunk/vector/v.out.postgis/main.c
Log:
v.out.postgis: do not print build info when exporting simple features
Modified: grass/trunk/vector/v.out.postgis/main.c
===================================================================
--- grass/trunk/vector/v.out.postgis/main.c 2017-04-28 09:19:12 UTC (rev 70974)
+++ grass/trunk/vector/v.out.postgis/main.c 2017-04-28 10:34:31 UTC (rev 70975)
@@ -32,7 +32,7 @@
struct params params;
struct flags flags;
- int ret, field, otype;
+ int ret, field, otype, verbose;
char *schema, *olayer, *pg_file;
char *fid_column, *geom_column;
@@ -170,12 +170,18 @@
/* close input map */
Vect_close(&In);
- /* build topology for output map */
+ /* build topology for output map -> write output to DB */
+ G_message(_("Writing output..."));
+ verbose = G_verbose();
+ if (!flags.topo->answer)
+ G_set_verbose(0); /* do not print build info when writing simple features */
+
Vect_build_partial(&Out, GV_BUILD_NONE);
if (Vect_build(&Out) != 1)
G_fatal_error(_("Building %s topology failed"),
flags.topo->answer ? "PostGIS" : "pseudo");
-
+ G_set_verbose(verbose);
+
if (Vect_get_num_lines(&Out) < 1)
G_fatal_error(_("No features exported. PostGIS layer <%s> not created."),
Vect_get_name(&Out));
More information about the grass-commit
mailing list