Quellcode durchsuchen

libproj: fix GPJ_transform[_array] for PROJ 4

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@72524 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz vor 7 Jahren
Ursprung
Commit
49489c8a4f
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 1 1
      lib/proj/convert.c
  2. 2 2
      lib/proj/do_proj.c

+ 1 - 1
lib/proj/convert.c

@@ -860,7 +860,7 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
 		if (strcmp(proj4_unit, gpj_units[i].id) == 0) {
 		    if (pszUnitsName)
 			G_free(pszUnitsName);
-		    G_asprintf(&pszUnitsName, gpj_units[i].name);
+		    G_asprintf(&pszUnitsName, "%s", gpj_units[i].name);
 		    break;
 		}
 		i++;

+ 2 - 2
lib/proj/do_proj.c

@@ -242,7 +242,7 @@ int GPJ_transform(const struct pj_info *info_in,
     if (info_out == NULL)
 	G_fatal_error(_("No output projection"));
 
-    if (dir == FWD) {
+    if (dir == PJ_FWD) {
 	p_in = info_in;
 	p_out = info_out;
     }
@@ -445,7 +445,7 @@ int GPJ_transform_array(const struct pj_info *info_in,
     /* PROJ 4 variant */
     const struct pj_info *p_in, *p_out;
 
-    if (dir == FWD) {
+    if (dir == PJ_FWD) {
 	p_in = info_in;
 	p_out = info_out;
     }