[GRASS-SVN] r74194 - grass/trunk/lib/proj

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 8 12:45:10 PST 2019


Author: mmetz
Date: 2019-03-08 12:45:10 -0800 (Fri, 08 Mar 2019)
New Revision: 74194

Modified:
   grass/trunk/lib/proj/do_proj.c
Log:
libproj: test for PROJ6

Modified: grass/trunk/lib/proj/do_proj.c
===================================================================
--- grass/trunk/lib/proj/do_proj.c	2019-03-08 19:35:38 UTC (rev 74193)
+++ grass/trunk/lib/proj/do_proj.c	2019-03-08 20:45:10 UTC (rev 74194)
@@ -98,9 +98,11 @@
 						    info_out->srid,
 						    NULL);
 
-	    if (info_trans->pj == NULL)
+	    if (info_trans->pj == NULL) {
 		G_warning(_("proj_create_crs_to_crs() failed for '%s' and '%s'"),
 		          info_in->srid, info_out->srid);
+	    }
+#if PROJ_VERSION_MAJOR >= 6
 	    else {
 		char *str = proj_as_proj_string(NULL, info_trans->pj,
 		                                PJ_PROJ_5, NULL);
@@ -108,6 +110,7 @@
 		if (str)
 		    info-trans->def = G_store(str);
 	    }
+#endif
 	}
 	if (info_trans->pj == NULL) {
 	    if (info_out->pj != NULL && info_out->def != NULL)



More information about the grass-commit mailing list