Browse Source

g.proj: generate wkt output from EPSG code if available (do not discard towgs84 parameter)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@71307 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 7 years ago
parent
commit
6a0c9127f2
4 changed files with 4 additions and 3 deletions
  1. 1 0
      general/g.proj/input.c
  2. 1 1
      general/g.proj/local_proto.h
  3. 1 1
      general/g.proj/main.c
  4. 1 1
      general/g.proj/output.c

+ 1 - 0
general/g.proj/input.c

@@ -52,6 +52,7 @@ void input_currloc(void)
     if (cellhd.proj != PROJECTION_XY) {
 	projinfo = G_get_projinfo();
 	projunits = G_get_projunits();
+        projepsg = G_get_projepsg();
     }
 
     return;

+ 1 - 1
general/g.proj/local_proto.h

@@ -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 */

+ 1 - 1
general/g.proj/main.c

@@ -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[])

+ 1 - 1
general/g.proj/output.c

@@ -180,7 +180,7 @@ void print_wkt(int esristyle, int dontprettify)
     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);