I have a script which converts local coordinates to WGS84.
The script works fine if source data and source CS is epsg:21781. The CS for the data has changed now to epsg:2056. When I use epsg:2056 as source the point coordinate is not transformed at all and the transformation output equals transformation input. Here is the script where the transformation takes place:
var src = new Proj4js.Proj("EPSG:21781"); //<-- EPSG:2056 does not transform
var dst = new Proj4js.Proj("WGS84");
var point = new Proj4js.Point(center.lon, center.lat);
Proj4js.transform(src, dst, point)
I don't know anything about Proj4js and I'm just stuck here.
Best Answer
You must just use version that is new enough for having support for EPSG:2056. For example, the development versions from http://www.gisinternals.com/ are built with proj.4 version "proj-4.8" and they know your projection.
Check if EPSG:2056 is recognized:
The definitions of the new and old seem to be:
Changes seem to be in false easting and northing and in towgs84 parameters.
If you can't update your Proj.4 you can always define the projection with the proj string instead of the EPSG:code. Thus use this as projection and you will be fine: