2

I'm trying to convert a EPSG:3857(Google/OSM) coordinate to a SWEREF99 TM coordinate using proj4js but the following code produces a invalid result:

sweref99 = "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs "
proj4('EPSG:3857', sweref99, [17.375, 62.15])

Output: [-1188634.4915465375, 63.90148326237714]. Expected output: [623764.06663, 6893158.947579].

How can I solve this and convert a EPSG:3857 point to a SWEREF99 TM point?

closed as off-topic by underdark Jan 7 '16 at 19:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – underdark
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    You're passing in lat/lon coordinates (I assume) so your input CRS should be 'EPSG:4326' instead. – mkennedy Jan 7 '16 at 18:17
  • Closing as obsolete, unlikely to help future readers. – underdark Jan 7 '16 at 19:51
2

The coordinates you're passing in are latitude and longitude values so the input coordinate reference system (CRS) should be 'EPSG:4326' or some other geographic CRS instead.

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