[Proj] Amersfoort / RD New

Sebastiaan Couwenberg sebastic at xs4all.nl
Wed Nov 2 11:54:31 PDT 2016


On 11/02/2016 11:06 AM, Roger Oberholtzer wrote:
> On Wed, Nov 2, 2016 at 9:48 AM, Bas Couwenberg <sebastic at xs4all.nl> wrote:
> 
>> On 2016-11-02 09:36, Roger Oberholtzer wrote:
>>> I have updated to 4.9.3. My rdnap file is identical to yours:
>>>
>>> # RDNAP with NTv2 and VDatum
>>> <rdnap> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889
>>> +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel
>>> +nadgrids=rdtrans2008.gsb +geoidgrids=naptrans2008.gtx +units=m
>>> +no_defs
>>> <>
>>>
>>> If I run this:
>>> cs2cs  -r +init=epsg:4258 +to +init=rdnap:rdnap -f %.4f
>>>
>>> And provide these locations:
>>>
>>> 50.792584908 5.773795547 174.9478
>>>
>>> I get this:
>>>
>>> 182225.9086     311388.1617 128.9976
>>>
>>> Not the values you listed:
>>>
>>> 182260.4500     311480.6701 129.0000
>>>
>>>
>>> I'm confused.
>>
>> Does your epsg file use +towgs84 values for EPSG:4258?
>>
>>   # ETRS89
>>   <4258> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
>>
>> I guess you're on Windows, which uses a different libc that may also
>> explain the divergence.
>>
> 
> I'm on Linux. I see that when I updated my libproj, a new epsg file was
> installed. I don't usually use that file. I did here because I wanted to
> duplicate your exact command. 4258 is defined as:
> 
> <4258> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
> 
> I'm curious why you use both the definition in the epsg file, as well as
> the one in rdnap. Why not everything in the rdnap file? What is your
> definition for 4258?

My definition for EPSG:4258 is the one from PROJ.4 4.9.3, the one below
"# ETRS89" in the quote above.

Since the EPSG:4258 definition is already available in the epsg file,
there is no need to duplicate it in the rdnap file.

> If I change my command to:
> 
> cs2cs  -r  +to +init=rdnap:rdnap
> 
> I see that the grid shift file is now read. But my computed values are
> still:
> 
> 182225.9086     311388.1617 128.9976

We'll need more information about your environment to find out the cause
of the difference. I'm starting to suspect that the old PROJ.4
installation is still being used, not the new version you installed
elsewhere.

I cannot reproduce your problem, both PROJ.4 4.8.0 on Debian stable &
4.9.3 on Debian unstable produce the same result for me:

 $ lsb_release -ds
 Debian GNU/Linux 8.6 (jessie)
 $ apt-cache show proj-bin | grep Version
 Version: 4.8.0-5
 $ echo "50.792584908 5.773795547 174.9478" \
 | PROJ_DEBUG=3 cs2cs  -r +init=epsg:4258 +to +init=rdnap:rdnap -f %.4f
 pj_open_lib(epsg): call fopen(/usr/share/proj/epsg) - succeeded

 pj_open_lib(rdnap): call fopen(/usr/share/proj/rdnap) - succeeded

 pj_open_lib(rdtrans2008.gsb): call
fopen(/usr/share/proj/rdtrans2008.gsb) - succeeded

 NTv2 NL_ALL   63x65: LL=(2.5,50.5) UR=(7.66666667,55.8333333)

 NTv2 NL_LAND  561x421: LL=(3,50.5) UR=(7.66666667,54)

 NTv2 - loading grid NL_LAND
 pj_open_lib(rdtrans2008.gsb): call
fopen(/usr/share/proj/rdtrans2008.gsb) - succeeded

 pj_apply_gridshift(): used NL_LAND
 pj_open_lib(naptrans2008.gtx): call
fopen(/usr/share/proj/naptrans2008.gtx) - succeeded

 GTX 311x641: LL=(2.5,50.5) UR=(7.66666667,55.8333333)
 pj_open_lib(naptrans2008.gtx): call
fopen(/usr/share/proj/naptrans2008.gtx) - succeeded

 pj_apply_gridshift(): used GTX Vertical Grid Shift File
 182260.4500     311480.6701 129.0000


 $ lsb_release -ds
 Debian GNU/Linux unstable (sid)
 $ apt-cache show proj-bin | grep Version
 Version: 4.9.3-1
 $ echo "50.792584908 5.773795547 174.9478" \
 | PROJ_DEBUG=3 cs2cs  -r +init=epsg:4258 +to +init=rdnap:rdnap -f %.4f
 pj_open_lib(epsg): call fopen(/usr/share/proj/epsg) - succeeded

 pj_open_lib(rdnap): call fopen(/usr/share/proj/rdnap) - succeeded

 pj_open_lib(rdtrans2008.gsb): call
fopen(/usr/share/proj/rdtrans2008.gsb) - succeeded

 NTv2 NL_ALL   63x65: LL=(2.5,50.5) UR=(7.66666667,55.8333333)

 NTv2 NL_LAND  561x421: LL=(3,50.5) UR=(7.66666667,54)

 NTv2 - loading grid NL_LAND
 pj_open_lib(rdtrans2008.gsb): call
fopen(/usr/share/proj/rdtrans2008.gsb) - succeeded

 pj_apply_gridshift(): used NL_LAND
 pj_open_lib(naptrans2008.gtx): call
fopen(/usr/share/proj/naptrans2008.gtx) - succeeded

 GTX 311x641: LL=(2.5,50.5) UR=(7.66666667,55.8333333)
 pj_open_lib(naptrans2008.gtx): call
fopen(/usr/share/proj/naptrans2008.gtx) - succeeded

 pj_apply_gridshift(): used GTX Vertical Grid Shift File
 182260.4500     311480.6701 129.0000


Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1



More information about the Proj mailing list