I want to preserve shape of objects, so how do I implement "conformal mapping" in openlayers 4.6.5?

My current objects: I have several geoJSON objects (WGS84) around the globe in long/lat with a given shape. These objects are converted to 3857 this way:

ol.proj.transform([long, lat], 'EPSG:4326', 'EPSG:3857').

My current map: Using this: map.getView().getProjection(); I get the following output:

xb {wb: "EPSG:3857", a: "m", i: Array(4), oe: Array(4), b: "enu", …}

My previous post : Getting different resolution between horizontal/vertical directions, from lon/lat to openlayers map?

also explains what i want to achieve, however how do i do it in practice?

Post and pages already read:

  • 2
    There isn't a conformal projection which covers the whole globe. One solution would be to maintain a "rolling" projection which is correct at the view center such as its local UTM projection: codepen.io/mike-000/pen/rNBjaEx When zoomed out there will be distortion at the edges but otherwise the scale will be close to true.
    – Mike
    Commented Aug 22, 2019 at 13:29
  • Very good answer, this is exactly what i need! (I think). UTM is the ideal solution. The objects are never bigger then 700 meters in any direction, and when viewing the object, the rest of the map is completely irrelevant :) One question: In your suggested solution, do i need to "translate" my center coordinates in lon/lat to any "UTM-current_meridian" or can i use them "as-is"? (If you understand my question).
    – otk
    Commented Aug 23, 2019 at 6:39
  • This means i have to include proj4js, yes ? cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4.js
    – otk
    Commented Aug 23, 2019 at 8:10
  • Ok, i see now that the translation i asked about in the first comment is already in the codepen. However, for some regions i need to append customized zones, ref: gis.stackexchange.com/questions/13291/… @Mike , or does it implement in your codepen aswell?
    – otk
    Commented Aug 23, 2019 at 11:35
  • 1
    It hasn't made any provision for special areas such as Svalbard. Those are intended to avoid high arctic regions being fragmented into multiple zones, but for conformal results sticking to 3 degrees either side of a central meridian would be better.
    – Mike
    Commented Aug 23, 2019 at 12:23


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.