[GRASS-SVN] r70424 - grass/branches/releasebranch_7_0/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 24 07:14:07 PST 2017


Author: martinl
Date: 2017-01-24 07:14:07 -0800 (Tue, 24 Jan 2017)
New Revision: 70424

Modified:
   grass/branches/releasebranch_7_0/lib/vector/Vlib/open.c
Log:
v.external.out: SRID lost when not exactly defined (fix #3262)
                (merge r70422 from relbr72)


Modified: grass/branches/releasebranch_7_0/lib/vector/Vlib/open.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/vector/Vlib/open.c	2017-01-24 15:11:49 UTC (rev 70423)
+++ grass/branches/releasebranch_7_0/lib/vector/Vlib/open.c	2017-01-24 15:14:07 UTC (rev 70424)
@@ -1391,8 +1391,16 @@
             
             /* srid (default: 0) */
             p = G_find_key_value("srid", key_val);
-            if (p)
+            if (p) {
                 pg_info->srid = atoi(p);
+            }
+            else {
+                /* not defined by v.external.out, so try if EPSG code
+                 * is defined */
+                p = G_database_epsg_code();
+                if (p)
+                    pg_info->srid = atoi(p);
+            }
             G_debug(1, "PG: srid = %d", pg_info->srid);
             
             /* table name */



More information about the grass-commit mailing list