[Proj] Conversion to Swiss coordinates

Mathias bavay bavay at slf.ch
Tue Jan 9 10:43:55 EST 2007


I found in the epsg file the transformation for Swiss coordinates. I 
then tried to convert (47.38195,8.54879) (lat/long) to Swiss coordinates 
using the following command line:

echo "47.38195 8.54879" | cs2cs -r -s +proj=latlong +datum=WGS84 +to 
+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 
+x_0=2600000 +y_0=1200000 +ellps=bessel 
+towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs

Basically, everything after the "+to" is a cut and paste of the epsg 
file. But instead of (600920,228685) it gives me "1248494.59      
2683831.35 -47.46"

So, my question is, what am I doing wrong?

My second question is, is there any way to tell cs2cs that I want to 
convert to/from CH1903 (or code <2056>) or do I simply have to cut and 
paste the line given in the epsg file every time?

Thank you very much,

More information about the Proj mailing list