Skip to content
Permalink
Browse files
Apply CONFIG PROJ_LIB to GDAL/OGR PROJ settings
  • Loading branch information
github-actions[bot] committed Oct 3, 2020
1 parent 0c4b66c commit a8e9a24
Showing 1 changed file with 10 additions and 0 deletions.
@@ -36,6 +36,8 @@
#include <sys/stat.h>
#include "mapaxisorder.h"

#include "ogr_srs_api.h"

static char *ms_proj_lib = NULL;
#if PROJ_VERSION_MAJOR >= 6
static unsigned ms_proj_lib_change_counter = 0;
@@ -2399,6 +2401,14 @@ void msSetPROJ_LIB( const char *proj_lib, const char *pszRelToPath )
#endif
msReleaseLock( TLOCK_PROJ );

#if GDAL_VERSION_MAJOR >= 3
if( ms_proj_lib != NULL )
{
const char* const apszPaths[] = { ms_proj_lib, NULL };
OSRSetPROJSearchPaths(apszPaths);
}
#endif

if ( extended_path )
msFree( extended_path );
}

0 comments on commit a8e9a24

Please sign in to comment.