Coordinates – how to switch between different coordinate systems?

This is one of the things is asked from me more or less on daily basis. How to change a coordinate system and how can I show my location taken from GPS on a Finnish ETRS-TM35FIN map?

Luckily it is doable. The one thing you of course have to know is, what is your original coordinate system and into which system you would like to convert it.

Here is a simple example how to switch between WGS84, Web Mercator and Finnish ETRS-TM35FIN. The example below is using Proj4js library.

//First define ETRS-TM35FIN
Proj4js.defs[“EPSG:3067”] = “+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs”;
//Source coordinates
var source = new Proj4js.Proj(‘EPSG:4326’);    //source coordinates will be in Longitude/Latitude
var dest_google = new Proj4js.Proj(‘EPSG:900913’);
//destination coordinates
var dest_finnish = new Proj4js.Proj(‘EPSG:3067’);
var p = new Proj4js.Point(24.6292, 62.725);
Proj4js.transform(source, dest_google, p);
var dest_finnish = new Proj4js.Proj(‘EPSG:3067’);
var p = new Proj4js.Point(24.6292, 62.725);
Proj4js.Point(lon,lat); Proj4js.transform(source, dest_google, p);

Test it online here

In case you need more information about coordinate transformations, have a look at FGI Coordinate Transformation Service.