[Gdal-dev] Setting PROJ4 path programatically

Frank Warmerdam warmerdam at pobox.com
Fri Jun 16 20:48:18 EDT 2006


Craig Miller wrote:
> In digging through the archives, I found a post that briefly describes how
> to set the path where PROJ4 looks for its data files (E.g. proj4/nad).  The
> message mentions two functions:
> 
> 	pj_set_finder(...);
> 	CPLSetConfigOption("GDAL_DATA", ...);
> 
> If I'm only using OGRSpatialReference directly and not calling into proj4
> directly is the CPLSetConfigOption sufficient or do I need to call
> pj_set_finder(...) as well.

Craig,

I believe you need to call pj_set_finder() even if you are only using PROJ.4
second hand, though this likely only applies for finding stuff like datum
shift files.

> Will these calls affect any other applications that are running on the same
> machine that are also using PROJ4?

Neither call will have an effect outside the process in which they are made.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list