[GRASS-SVN] r72472 - grass/trunk/raster/r.horizon

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 21 11:18:06 PDT 2018


Author: mmetz
Date: 2018-03-21 11:18:06 -0700 (Wed, 21 Mar 2018)
New Revision: 72472

Modified:
   grass/trunk/raster/r.horizon/main.c
Log:
r.horizon: adjust support for PROJ 5+ API

Modified: grass/trunk/raster/r.horizon/main.c
===================================================================
--- grass/trunk/raster/r.horizon/main.c	2018-03-21 18:12:50 UTC (rev 72471)
+++ grass/trunk/raster/r.horizon/main.c	2018-03-21 18:18:06 UTC (rev 72472)
@@ -844,11 +844,7 @@
 	    longitude = xp;
 	    latitude = yp;
 
-#ifdef HAVE_PROJ_H
 	    if (GPJ_do_proj_ll(&longitude, &latitude, &iproj, PJ_INV) < 0) {
-#else
-	    if (pj_do_proj(&longitude, &latitude, &iproj, &oproj) < 0) {
-#endif
 		G_fatal_error(_("Error in pj_do_proj"));
 	    }
 	}
@@ -866,11 +862,7 @@
 	latitude = (latitude + delt_lat) * rad2deg;
 	longitude = (longitude + delt_lon) * rad2deg;
 
-#ifdef HAVE_PROJ_H
 	if (GPJ_do_proj_ll(&longitude, &latitude, &iproj, PJ_FWD) < 0) {
-#else
-	if (pj_do_proj(&longitude, &latitude, &oproj, &iproj) < 0) {
-#endif
 	    G_fatal_error(_("Error in pj_do_proj"));
 	}
 
@@ -1208,11 +1200,7 @@
 
 
 		    if ((G_projection() != PROJECTION_LL)) {
-#ifdef HAVE_PROJ_H
 			if (GPJ_do_proj_ll(&longitude, &latitude, &iproj, PJ_INV) < 0)
-#else
-			if (pj_do_proj(&longitude, &latitude, &iproj, &oproj) < 0)
-#endif
 			    G_fatal_error("Error in pj_do_proj");
 		    }
 
@@ -1232,11 +1220,7 @@
 		    longitude = (longitude + delt_lon) * rad2deg;
 
 		    if ((G_projection() != PROJECTION_LL)) {
-#ifdef HAVE_PROJ_H
 			if (GPJ_do_proj_ll(&longitude, &latitude, &iproj, PJ_FWD) < 0)
-#else
-			if (pj_do_proj(&longitude, &latitude, &oproj, &iproj) < 0)
-#endif
 			    G_fatal_error("Error in pj_do_proj");
 		    }
 



More information about the grass-commit mailing list