[GRASS-SVN] r72324 - in grass/branches/releasebranch_7_4: lib/raster raster/r.out.gdal

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 5 06:57:59 PST 2018


Author: mmetz
Date: 2018-03-05 06:57:59 -0800 (Mon, 05 Mar 2018)
New Revision: 72324

Modified:
   grass/branches/releasebranch_7_4/lib/raster/gdal.c
   grass/branches/releasebranch_7_4/raster/r.out.gdal/main.c
Log:
r.external.out/r.out.gdal: add CRS EPSG code if available (backport trunk r72159)


Modified: grass/branches/releasebranch_7_4/lib/raster/gdal.c
===================================================================
--- grass/branches/releasebranch_7_4/lib/raster/gdal.c	2018-03-05 09:06:01 UTC (rev 72323)
+++ grass/branches/releasebranch_7_4/lib/raster/gdal.c	2018-03-05 14:57:59 UTC (rev 72324)
@@ -358,7 +358,7 @@
 {
     int initialized;
     struct GDAL_Options opts;
-    struct Key_Value *projinfo, *projunits;
+    struct Key_Value *projinfo, *projunits, *projepsg;
     char *srswkt;
 } state;
 
@@ -432,8 +432,10 @@
 	read_gdal_options();
 	st->projinfo = G_get_projinfo();
 	st->projunits = G_get_projunits();
+	st->projepsg = G_get_projepsg();
 	if (st->projinfo && st->projunits)
-	    st->srswkt = GPJ_grass_to_wkt(st->projinfo, st->projunits, 0, 0);
+	    st->srswkt = GPJ_grass_to_wkt2(st->projinfo, st->projunits,
+	                                   st->projepsg, 0, 0);
 	G_initialize_done(&st->initialized);
     }
 

Modified: grass/branches/releasebranch_7_4/raster/r.out.gdal/main.c
===================================================================
--- grass/branches/releasebranch_7_4/raster/r.out.gdal/main.c	2018-03-05 09:06:01 UTC (rev 72323)
+++ grass/branches/releasebranch_7_4/raster/r.out.gdal/main.c	2018-03-05 14:57:59 UTC (rev 72324)
@@ -284,7 +284,8 @@
     /* Read project and region data */
     struct Key_Value *projinfo = G_get_projinfo();
     struct Key_Value *projunits = G_get_projunits();
-    char *srswkt = GPJ_grass_to_wkt(projinfo, projunits, 0, 0);
+    struct Key_Value *projepsg = G_get_projepsg();
+    char *srswkt = GPJ_grass_to_wkt2(projinfo, projunits, projepsg, 0, 0);
 
     G_get_window(&cellhead);
 



More information about the grass-commit mailing list