[Proj] proj-4.6.0 and BETA2007.gsb
Oliver Eichler
oliver.eichler at dspsolutions.de
Mon Jan 21 03:34:56 EST 2008
Frank Warmerdam schrieb:
>
> Oliver,
>
> I'm not aware of any change in handling datum shift files in 4.6 vs
> 4.5. I would suggest you carefully review your PROJ_LIB setting in
> the two environments. If everything still checks out, perhaps you can
> describe the exact command you are using,and make the .gsb file available
> so others can try the same thing.
>
Hi Frank,
I pulled the source from your webpage again and did:
./configure --prefix=/usr --libdir=/usr/lib64 && make
The projection string I use is:
"+proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0
+ellps=bessel +datum=potsdam +units=m +no_defs +nadgrids=./BETA2007.gsb"
The file BETA2007.gsb is in my working path (download
http://crs.bkg.bund.de/crseu/crs/descrtrans/BeTA/de_dhdn2etrs_beta.php)
ldd says:
libproj.so.0 => /usr/lib64/libproj.so.0 (0x00002b8376350000)
>ll /usr/lib64/libproj.*
-rw-r--r-- 1 root root 2020350 21. Jan 08:35 /usr/lib64/libproj.a
-rwxr-xr-x 1 root root 816 21. Jan 08:35 /usr/lib64/libproj.la
lrwxrwxrwx 1 root root 16 21. Jan 08:35 /usr/lib64/libproj.so ->
libproj.so.0.5.4
lrwxrwxrwx 1 root root 16 21. Jan 08:35 /usr/lib64/libproj.so.0 ->
libproj.so.0.5.4
-rwxr-xr-x 1 root root 914576 30. Nov 13:50 /usr/lib64/libproj.so.0.5.3
-rwxr-xr-x 1 root root 911873 21. Jan 08:35 /usr/lib64/libproj.so.0.5.4
Thus the correct library is linked.
In my code I do a:
...
pjtar = pj_init_plus("+proj=longlat +ellps=WGS84 +no_defs");
pjrsc =pj_init_plus(" +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000
+x_0=4500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs
+nadgrids=./BETA2007.gsb");
...
and later a:
pj_transform(pjsrc,pjtar,1,0,&pt.u,&pt.v,0);
or:
pj_transform(pjtar,pjsrc,1,0,&pt.u,&pt.v,0);
to convert from m to degree, and vice versa.
export PROJ_DEBUG=10
won't give be any debug output on the PC with libproj.so.0.5.4. Whereas
it will give me output on a machine with libproj.so.0.5.2, telling that
it opens BETA2007.gsb and chooses the correct coefficient set for
correction.
Tell me if you need more information. Thanks for help.
Olver
More information about the Proj
mailing list