[Proj] Conversion to Swiss coordinates
Frank Warmerdam
warmerdam at pobox.com
Tue Jan 9 08:24:14 PST 2007
Mathias bavay wrote:
> Hi!
>
> 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"
Mathias,
Sorry, I don't know why you aren't getting the results you expect.
I have reproduced similar behavior to what you are seeing.
> 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?
You can use +init=epsg:2056 instead like this:
cs2cs -r -s +proj=latlong +datum=WGS84 +to +init=epsg:2056
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the Proj
mailing list