[Proj] Problems using grid shift files

Mikael Rittri Mikael.Rittri at carmenta.com
Fri Jan 23 09:05:11 EST 2009

I wrote:
> ... although I don't know if your gridshift file is intended for CH1903 or for CH1903+.

I tried to check this, and it seems that chenyx06.gsb transforms 
from CH1903 (long/lat) to CH1903+ (long/lat).  

This is clear from the ASCII version of the file, chenyx06.asc, where 
lines 6 and 7 are:


and F presumably means From, and T means To. (Also, the shifts are 
all less than 0.1 arc seconds, or about 3 meters.  The shifts from
CH1903 or CH1903+ to WGS84 would have been much larger.)  

I think cs2cs normally assumes that a grid shift file will transform a national datum to WGS84.
So I don't know how chenyx06.gsb can be used by cs2cs, but perhaps some pipe 
construction could be used.  

Best regards,
Mikael Rittri
Carmenta AB

-----Original Message-----
From: proj-bounces at lists.maptools.org [mailto:proj-bounces at lists.maptools.org] On Behalf Of Ziegler Stefan
Sent: den 19 januari 2009 17:00
To: proj
Subject: [Proj] Problems using grid shift files

Dear List

we have some problems using grid shift files. We are using a grid shift file which was developed by the Swiss Federal Office of Topography [1]. We just duplicated epsg 21781 (to 921781) and 2056 (to 902056) in the epsg file and added "+nadgrids=chenyx06.gsb" and "+nadgrids=@null":

+proj=somerc +lat_0=46d57'08.66"N +lon_0=7d26'22.50"E +ellps=bessel 
++x_0=600000 +y_0=200000 +towgs84=674.374,15.056,405.346 +units=m +k_0=1 

+proj=somerc +lat_0=46d57'08.66"N +lon_0=7d26'22.50"E +ellps=bessel 
++x_0=2600000 +y_0=1200000 +towgs84=674.374,15.056,405.346 +units=m 
++k_0=1 +no_defs

+proj=somerc +lat_0=46d57'08.66"N +lon_0=7d26'22.50"E +ellps=bessel 
++x_0=600000 +y_0=200000 +towgs84=674.374,15.056,405.346 +units=m 
++nadgrids=chenyx06.gsb +k_0=1 +no_defs

+proj=somerc +lat_0=46d57'08.66"N +lon_0=7d26'22.50"E +ellps=bessel 
++x_0=2600000 +y_0=1200000 +towgs84=674.374,15.056,405.346 +units=m 
++nadgrids=@null +k_0=1 +no_defs

+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs

+proj=longlat +ellps=WGS84 +datum=WGS84 +nadgrids=@null

Here are the results:

21781 -> 2056: correct!
921781 -> 90256: correct (with grid shift file)!

921781 -> 2056: wrong!
921781 -> 4326: wrong!
921781 -> 904326: wrong!

Is the grid shift only applied if the destination definiton has a "+nadgrids=@null"? But then why is the transformation to 904326 not correct? Has this something to do with this bug report [2]? Or I'm just mixing up some parameters? Same results with Proj 4.5 and 4.6.1. Any help is appreciated.


[1]: http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/lv03-lv95/chenyx06/distortion_grids.html
[2]: http://trac.osgeo.org/proj/ticket/22

Mit freundlichem Gruss
Stefan Ziegler
Leiter Aufsicht

Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
Rötistrasse 4
4501 Solothurn
Telefon 032 627 75 96
Telefax 032 627 75 98
stefan.ziegler at bd.so.ch

More information about the Proj mailing list