[GRASS-SVN] r69494 - grass/trunk/lib/proj
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 15 02:20:27 PDT 2016
Author: martinl
Date: 2016-09-15 02:20:27 -0700 (Thu, 15 Sep 2016)
New Revision: 69494
Modified:
grass/trunk/lib/proj/datum.c
Log:
Fix GPJ__get_datum_params() to respect r69211 (see #2456)
Modified: grass/trunk/lib/proj/datum.c
===================================================================
--- grass/trunk/lib/proj/datum.c 2016-09-15 07:51:55 UTC (rev 69493)
+++ grass/trunk/lib/proj/datum.c 2016-09-15 09:20:27 UTC (rev 69494)
@@ -189,11 +189,17 @@
returnval = 2;
}
else if (G_find_key_value("nadgrids", projinfo) != NULL) {
- const char *gisbase = G_gisbase();
+ const char *projshare = getenv("GRASS_PROJSHARE");
- G_asprintf(params, "nadgrids=%s%s/%s", gisbase, GRIDDIR,
- G_find_key_value("nadgrids", projinfo));
- returnval = 2;
+ if (!projshare) {
+ G_warning(_("Failed to detect nadgrids path, GRASS_PROJSHARE not defined"));
+ returnval = -1;
+ }
+ else {
+ G_asprintf(params, "nadgrids=%s%c%s", projshare, HOST_DIRSEP,
+ G_find_key_value("nadgrids", projinfo));
+ returnval = 2;
+ }
}
else if (G_find_key_value("towgs84", projinfo) != NULL) {
G_asprintf(params, "towgs84=%s",
More information about the grass-commit
mailing list