[postgis-users] Re: PROJ Projection Issues

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon Oct 22 03:48:10 PDT 2007


On Sun, 2007-10-21 at 17:57 -0600, Brian Timoney wrote:
> 
> Paul:
> 
> In the Windows install, there is the "libproj.dll" in the BIN directory 
> but no other files with which have names that imply 'grid' or 'nad'.  
> Unfortunately, we don't have an older Windows install in the office to 
> compare to...
> 
> Thanks,
> 
> Brian


Hi Brian,

This may actually be my fault here. When I did the original build of the
Win32 installers, I had a copy of PROJ.4 along with datum files
installed in C:\PROJ\NAD and so everything just worked fine. However,
with my VM rebuild these files weren't installed on my system (and were
not included as part of the install) so this probably explains why it's
not working.

The decision to make here is should the PostGIS installer make use of
existing PROJ.4 datum files, or should it be self-contained? I've had a
look at the PROJ.4 source code and I see that in my current MingW build
of PROJ 4.5.0 that PROJ_LIB is set to "$(pkgdatadir)" which points to my
PROJ.4 build directory - fairly useless for anyone else :(

The tricky part with distributing a set of the PROJ.4 datum files is how
to tell PROJ.4 where to find them. Is there a PROJ.4 call that allows
you to set PROJ_LIB dynamically? I realise that you can override the
compile-time value with an environment variable, however this would
involved changing the environment for the user running the postmaster
process which is not an easy thing to do where the user running the
installer != the PostgreSQL user.

Perhaps a slightly better solution would be to install the files in C:
\PROJ\NAD and then change the autoconf configuration so that you can
override the location of PROJ_LIB at compile-time using a --with-projlib
parameter to configure? I've CC'd Frank on this email as I'd be
interested to hear which he thinks is the best solution.


Kind regards,

Mark.

-- 
ILande - Open Source Consultancy
http://www.ilande.co.uk





More information about the postgis-users mailing list