Re: [Qgis-user] Georeference png files

2019-12-22 Thread LE LAMER Romain
Hi Nick,
Thanks for this method.
I didn't manage to do it in the QGIS python console but I installed gdal on the 
mac and it does the job perfectly.
I have more than to make a script to convert the whole and I could exploit that 
on QGIS.

> Le 22 déc. 2019 à 21:06, Nick Hopton  a écrit :
> 
> It is possible to assign georeferenced bounds to a raster using
> gdal_translate:
> 
> gdal_translate -a_ullr input.png output.tiff
> 
> Where:
>  = upper left x
>  = upper left y
>  = lower right x
>  = lower right  y
> 
> The resulting tiff won't contain CRS data.
> 
> Nick.
> 
> 
> 
> 
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Georeference png files

2019-12-22 Thread Nick Hopton
It is possible to assign georeferenced bounds to a raster using
gdal_translate:

gdal_translate -a_ullr input.png output.tiff

Where:
 = upper left x
 = upper left y
 = lower right x
 = lower right  y

The resulting tiff won't contain CRS data.

Nick.




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Georeference png files

2019-12-22 Thread LE LAMER Romain
@Nicolas :
I tried to save it in .geoTiff format (right click, export, save as) I end up 
with a white or black tile … 😕
If you want to try, here is the png and the coordinates (if you get there, I 
would like to know the method)

[cid:FA974430-F7BF-4AD9-BC9D-316070788235]

N = 71,71875
W = -180
S = 71,3671875
E = -179,6484375

@ Paolo & @ Nicolas :
Thanks, I will try the method with the .pngw file
(without being mistaken in the calculation)
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Georeference png files

2019-12-22 Thread Paolo Cavallini
You can use a pngw. Try saving your map as an image for an example.
Cheers.

On 22 December 2019 17:52:10 EET, Nicolas Cadieux 
 wrote:
>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  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@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

-- 
Please excuse my brevity.___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Georeference png files

2019-12-22 Thread Nicolas Cadieux
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  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@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Georeference png files

2019-12-22 Thread LE LAMER Romain
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@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user