I need to transform some line and polygon geometry to WGS 84.

enter image description here

At point it working fine, but at the line and polygone I have problems, I tried in many ways, but it does not work. In the screenshot you can see the geom Coordinates. How can I transform to WGS 84?

  • What projection are your data in now? Have you tried reprojecting in open source software like QGIS? – lambertj Feb 7 '18 at 15:23

If you can add your code will be better to understand.. However, this function helps you to convert your geometry to WGS-84

var ProjLayer = new ol.Layer.Vector("vector", {
           projection: map.displayProjection,
           preFeatureInsert: function(feature) {
           feature.geometry.transform([yourprojection],projWGS84);   //change here to your data projection

Your Answer

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

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