1

I'm using proj4js definitions downloaded directly from epsg.io webpage.

When trying to reproject a small extent I get this result:

ol.proj.transformExtent([-180, -90, -179, -89], 'EPSG:4326', 'EPSG:3395')

Result: [-20037508.342789244, -30198185.16987704, -3.12413936106985, -1.5707963267948966]

Isn't this absolutely wrong?

2
  • 2
    Or maybe I suppose it's because 3395's extent doesn't cover the whole of 4326 extent...
    – Thiatt
    Apr 28, 2016 at 15:31
  • -90 (or +90) goes to infinity in a Mercator projection. In Esri projection engine, the first two values you got are what I get for (-180, -79) so it could be the extent is getting wildly distorted. The last value is PI/2 in radians and value 3 is darn close to 2*PI.
    – mkennedy
    Apr 28, 2016 at 19:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.