Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var proj4 = require('proj4');
- var source = new proj4.Proj('EPSG:4326'); //source coordinates will be in Longitude/Latitude, WGS84
- var dest = new proj4.Proj("+proj=utm +zone=33 +ellps=intl +units=m +no_defs"); // see http://spatialreference.org/ref/epsg/2078/
- var p = new proj4.Point(10.68772, 59.4214); //any object will do as long as it has 'x' and 'y' properties
- proj4.transform(proj4.WGS84, dest, p); //do the transformation. x and y are modified in place
- console.log(p);
- /** Which will give the following output: */
- { x: 255387.99669727485,
- y: 6595140.362325359,
- z: -183.33591040596366 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement