Browse Source

libgis: fix reading of WKT and SRID

The PROJ lib does not remove leading and trailing white spaces, so we have to do it.
Markus Metz 4 years ago
parent
commit
9c9d19eccc
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/gis/get_projinfo.c

+ 2 - 2
lib/gis/get_projinfo.c

@@ -193,7 +193,7 @@ char *G_get_projwkt(void)
     if (fclose(fp) != 0)
 	G_fatal_error(_("Error closing output file <%s>: %s"), path, strerror(errno));
 
-    return wktstring;
+    return G_chop(wktstring);
 }
 
 /*!
@@ -292,5 +292,5 @@ char *G_get_projsrid(void)
     if (fclose(fp) != 0)
 	G_fatal_error(_("Error closing output file <%s>: %s"), path, strerror(errno));
 
-    return sridstring;
+    return G_chop(sridstring);
 }