[GRASS-SVN] r71307 - grass/trunk/general/g.proj

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jul 22 10:54:36 PDT 2017


Author: martinl
Date: 2017-07-22 10:54:36 -0700 (Sat, 22 Jul 2017)
New Revision: 71307

Modified:
   grass/trunk/general/g.proj/input.c
   grass/trunk/general/g.proj/local_proto.h
   grass/trunk/general/g.proj/main.c
   grass/trunk/general/g.proj/output.c
Log:
g.proj: generate wkt output from EPSG code if available (do not discard towgs84 parameter)

Modified: grass/trunk/general/g.proj/input.c
===================================================================
--- grass/trunk/general/g.proj/input.c	2017-07-22 17:46:54 UTC (rev 71306)
+++ grass/trunk/general/g.proj/input.c	2017-07-22 17:54:36 UTC (rev 71307)
@@ -52,6 +52,7 @@
     if (cellhd.proj != PROJECTION_XY) {
 	projinfo = G_get_projinfo();
 	projunits = G_get_projunits();
+        projepsg = G_get_projepsg();
     }
 
     return;

Modified: grass/trunk/general/g.proj/local_proto.h
===================================================================
--- grass/trunk/general/g.proj/local_proto.h	2017-07-22 17:46:54 UTC (rev 71306)
+++ grass/trunk/general/g.proj/local_proto.h	2017-07-22 17:54:36 UTC (rev 71307)
@@ -1,6 +1,6 @@
 #include <grass/config.h>
 
-extern struct Key_Value *projinfo, *projunits;
+extern struct Key_Value *projinfo, *projunits, *projepsg;
 extern struct Cell_head cellhd;
 
 /* input.c */

Modified: grass/trunk/general/g.proj/main.c
===================================================================
--- grass/trunk/general/g.proj/main.c	2017-07-22 17:46:54 UTC (rev 71306)
+++ grass/trunk/general/g.proj/main.c	2017-07-22 17:54:36 UTC (rev 71307)
@@ -23,7 +23,7 @@
 
 #include "local_proto.h"
 
-struct Key_Value *projinfo, *projunits;
+struct Key_Value *projinfo, *projunits, *projepsg;
 struct Cell_head cellhd;
 
 int main(int argc, char *argv[])

Modified: grass/trunk/general/g.proj/output.c
===================================================================
--- grass/trunk/general/g.proj/output.c	2017-07-22 17:46:54 UTC (rev 71306)
+++ grass/trunk/general/g.proj/output.c	2017-07-22 17:54:36 UTC (rev 71307)
@@ -180,7 +180,7 @@
     if (check_xy(FALSE))
 	return;
 
-    outwkt = GPJ_grass_to_wkt(projinfo, projunits, esristyle,
+    outwkt = GPJ_grass_to_wkt2(projinfo, projunits, projepsg, esristyle,
 			      !(dontprettify));
     if (outwkt != NULL) {
 	fprintf(stdout, "%s\n", outwkt);



More information about the grass-commit mailing list