[GRASS-SVN] r69613 - grass/branches/releasebranch_7_0/vector/v.out.postgis
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 30 12:25:55 PDT 2016
Author: martinl
Date: 2016-09-30 12:25:55 -0700 (Fri, 30 Sep 2016)
New Revision: 69613
Modified:
grass/branches/releasebranch_7_0/vector/v.out.postgis/create.c
Log:
v.out.postgis: fix epsg vs. srid check
(merge r69612 from relbr72)
Modified: grass/branches/releasebranch_7_0/vector/v.out.postgis/create.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.out.postgis/create.c 2016-09-30 19:23:18 UTC (rev 69612)
+++ grass/branches/releasebranch_7_0/vector/v.out.postgis/create.c 2016-09-30 19:25:55 UTC (rev 69613)
@@ -69,11 +69,14 @@
G_debug(1, "option: %s=%s", tokens[0], tokens[1]);
/* force lower case */
G_str_to_lower(tokens[0]);
-
- if (strcmp(tokens[0], "srid") && epsg)
- G_warning(_("EPSG code (%s) defined for current location will be ignored"),
- epsg);
+ /* strip whitespace for key/value */
+ G_strip(tokens[0]);
+ G_strip(tokens[1]);
+ if (strcmp(tokens[0], "srid") == 0 && (epsg && strcmp(tokens[1], epsg) != 0))
+ G_warning(_("EPSG code defined for current location (%s) is overridden by %s"),
+ epsg, tokens[1]);
+
G_set_key_value(tokens[0], tokens[1], key_val);
if (strcmp(tokens[0], "fid") == 0)
More information about the grass-commit
mailing list