I have an image of Europe and Asia with an unknown projection that I want to display on Leaflet. So I georeferenced it on QGIS with EPSG:3857.

The result looks pretty good. For example I get the following points/coordinates:

  • Northernmost point of France: 51.07, 2.53
  • Northernmost point of Hokkaido: 45.46, 141.89
  • Cape Town: -33.92, 18.46
  • Southernmost point of India: 8.09, 77.46

The result matches the world shapefile I have downloaded.

So, still from QGIS, I saved the output in a tif file. Which I then converted to PNG with:

gdal_translate -of PNG  -co worldfile=yes file.tif file.png

Here is what gdalinfo tells me about file.tif:

Size is 1269, 637
Coordinate System is:
    GEOGCS["unnamed ellipse",
Origin = (-27.056867121684334,81.529534762914096)
Pixel Size = (0.217559535863945,-0.217559535863945)
Image Structure Metadata:
Corner Coordinates:
Upper Left  ( -27.0568671,  81.5295348) (  0d 0' 0.88"W,  0d 0' 2.64"N)
Lower Left  ( -27.0568671, -57.0558896) (  0d 0' 0.88"W,  0d 0' 1.85"S)
Upper Right (     249.026,      81.530) (  0d 0' 8.05"E,  0d 0' 2.64"N)
Lower Right (     249.026,     -57.056) (  0d 0' 8.05"E,  0d 0' 1.85"S)
Center      ( 110.9846584,  12.2368226) (  0d 0' 3.59"E,  0d 0' 0.40"N)
Band 1 Block=1269x2 Type=Byte, ColorInterp=Red
Band 2 Block=1269x2 Type=Byte, ColorInterp=Green
Band 3 Block=1269x2 Type=Byte, ColorInterp=Blue

Everything is looking good. So I added it on Leaflet with:

var bounds= L.latLngBounds({lat: 81.5295348, lng: -27.0568671}, {lat: -57.056, lng: 249.026});
L.imageOverlay('file.png', bounds, {}).addTo(map);

On the map, the corners are all at the right place, but between them, it's not projected as I was expecting and the overlay not match the EPSG:3857 projection of Leaflet.

Which step did I fail?

By the way here is what I have on Leaflet: http://i.imgur.com/2O3k4sh.jpg

And here is what I have on QGIS: https://i.imgur.com/nRXC9ft.png

closed as off-topic by Ian Turton Oct 25 '17 at 10:03

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." – Ian Turton
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    those corners look like 4326 not 3857 – Ian Turton Oct 25 '17 at 9:11
  • How so? By the way here is what I have on Leaflet: i.imgur.com/2O3k4sh.png And here is what I have on QGIS: i.imgur.com/nRXC9ft.png – leyou Oct 25 '17 at 9:29
  • 1
    because they are very small unless you are mapping Null Island – Ian Turton Oct 25 '17 at 9:35
  • Ok I got it and everything's working now. Noobie mistake. Thanks for putting me on the track. – leyou Oct 25 '17 at 10:02