0

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:

1. https://epsg.io/

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
1
  • I’m voting to close this question because it cannot be answered as it stands now. The reference tool does not give the same result that is given in the question with the given coordinates, and alternative East coordinate value given in a comment leads to an error.
    – user30184
    Commented Aug 5, 2020 at 13:58

1 Answer 1

1

1)
If this was your reference tool, then the correct EPSG would be EPSG:3006, i.e., SWEREF 99 TM. This is (further) confirmed using the official Control Points

2) It also appears that your "flat Easting coordinate" value i.e., 1677500 looks off. Perhaps the correct value was 677500?

3) Using 6589150N and 677500E, the results are as below.

enter image description here

enter image description here


Reply to comment from Questioner

Question perspective your are right, but I actual problem is values of X and Y. >It should be interchanged and value 1677500->167750

The SWEREF 99 web tool uses X for (N)orthing or Latitude, and Y for (E)asting or longitude. This is a rather unfortunate choice, although not technically incorrect, because most software, including proj4.js, use X for longitude and Y for latitude.

If your Easting is 167750, then it won't compute. You can try it yourself in the SWEREF 99 web tool. And 1677500 appears "out of bound".

1
  • Question perspective your are right, but I actual problem is values of X and Y. It should be interchanged and value 1677500->167750
    – shak imran
    Commented Apr 30, 2020 at 7:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.