0

Leaflet documentation said that they have EPSG:3857 as default projection.

Using QGIS with OpenLayers plugin, I point to a location to find it's coordinate. I used EPSG:3857 in QGIS as well.

The problem is, the location doesn't match. I know that the location in Leaflet using "lat-long" format, while location in QGIS is using "long-lat" format.

Leaflet documentation said that it used "degree", while (I don't quite sure) I think QGIS use decimal.

Does anybody has experience with this? What is the solution?

1

The mismatch, is due to the different projections used for the coordinates.

In Leaflet, the Map is in EPSG:3857, while the coordinates used for various things are in LatLong (EPSG:4326).

In OpenStreetMaps Layer in Qgis, the map and the coordinates both are in EPSG:3857.

So when you see enter image description here in QGIS, these coordinates are in EPSG:3857 with units meters.

You will need to project the coordinates from Web Mercator to WGS84. I don't have much experience with leaflet, but you could have a look at the proj4js Library.

  • I also use EPSG:3857 for QGIS. This is indicated by the bottom-right box, isn't it? – goFrendiAsgard Apr 29 '13 at 4:39
  • You are correct. Whenever you add a layer from the OpenLayers Plugin, the coordinate system for QGIS is changed to EPSG 3857 – Devdatta Tengshe Apr 29 '13 at 4:43
  • 1
    Keep in mind that the EPSG:3857 units are not real metres. They match only at the equator with metres, and get squuezed the more to the poles you come. – AndreJ Apr 29 '13 at 6:42
  • @AndreJoost: My location is near to equator. So I think it shouldn't differ that much – goFrendiAsgard Apr 30 '13 at 0:56

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.