I want to convert local coordinate (SWEREF99) to Global coordinate(WGS 84). I tried 3 different ways and all produce almost same result which is not correct. From here I got actual result: https://www.lantmateriet.se/sv/Sjalvservice/enkel-koordinattransformation/
Input: 6589150 1677500
Expected output: 59.21888889 18.92916667
EGSG codes:
EPSG:3011 : SWEREF99 18 00
EPSG 4326 : WGS 84
But what I got form different options:
Output: 68.45944444 9.87361111
2. proj4js
Output: 68.45962374786117, 9.873651976751825
var firstProjection = '+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs';
var secondProjection = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs';
var output = proj4(firstProjection, secondProjection, [6589150, 1677500]);
2. GDAL
Output: 68.8978437634193 9.65669736119052
gdaltransform -s_srs EPSG:3011 -t_srs EPSG:4326
6589150 1677500