[Proj] Finding PROJ_LIB from application

Roger Bivand Roger.Bivand at nhh.no
Thu Jan 15 14:23:06 EST 2009


On Thu, 15 Jan 2009, Frank Warmerdam wrote:

> Roger Bivand wrote:
>> Nope, not a chance. Would you accept a patch (same as pj_open_lib() but 
>> returning the full path and closing fid)?
>
> Roger,
>
> I'm somewhat dubious about the utility of this capability. But if you
> were to offer a patch, I would suggest we add a new function called
> pj_find_lib() that returns the full path given a filename.  Most of
> pj_open_lib() would be migrated into that, and then pj_open_lib()
> would use it.
>
> I suppose if we are using fopen() to discover files, this will result
> in an extra unnecessary file opening and closing which might suck.  I
> suppose pj_find_lib() could also return the file handle, and pj_open_lib
> would become a very minimal wrapper around it to preserve the old api.
>
> What I am not likely to accept is a change to the pj_open_lib() ABI.

Frank,

I agree that this is probably overkill, so until I'm under pressure from 
users, I'll report the value of PROJ_LIB if present, or its absence if 
not. It ough to be enough, and avoids changing things that don't need 
changing. In GDAL, I'm using a single call to CSVFilename() to get the 
path.

Best wishes,

Roger

>
> Best regards,
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the Proj mailing list