[Qgis-user] Georeference png files

Nicolas Cadieux nicolas.cadieux at archeotec.ca
Sun Dec 22 07:52:10 PST 2019


Hi,

To my knowledge, and I may be wrong, you cannot insert a geotag in a .png.  Try saving as .tif. That should be georeferenced.  If you absolutely want to use a .png, you will need to create a world file.  To see how they work, just export the map window using .png.  A world file will be created and will contain the information you are looking for.  The world file is a text file that can be opened with notepad++ or any text editor.

https://en.wikipedia.org/wiki/World_file

Nicolas

> Le 22 déc. 2019 à 10:16, LE LAMER Romain <rlelamer at hotmail.fr> a écrit :
> 
> Hi,
> I have a complete map in tiles of 256 x 256 px in png format not georeferenced. (if I open them in QGIS they are superimposed on each other)
> 1024 tiles in Longitude and 512 tiles in Latitude = 524288 tiles.
> Each tile is named as follows: map_Z_X_Y.png
> Z => zoom (11).
> X => from 0 to 1023.
> Y => from 0 to 511.
> 
> # If I say no nonsense, I can, by calculation, know the Longitude and Latitude:
> lonN = (360 * (X / 1024)) - 180.
> latW = 90 - (180 * (Y / 512)).
> 
> In the same principle, I can determine the South East coordinates.
> I know that the whole map is divided into 1024 tiles of 256px in longitude, 1024 x 256 = 262144px for 360 ° so a tile = (256 x 360) / 262144 = 0.3515625 °
> Same reflection for the latitude, 512 tiles of 256px or 512 x 256 = 131 072px for 180 ° so a tile = (256 x 180) / 131 072 = 0.3515625 °
> 
> lonE = lonN + 0.3515625
> latS = latW - 0.3515625
> 
> How can I add these coordinates to the png file?
> 
> Thanks
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20191222/968de975/attachment.html>


More information about the Qgis-user mailing list