Georeferencing PNG image in QGIS when the coordinates of image corners are known

gdalgeoreferencingqgisraster

I have the image such as this:

enter image description here

everything would be fine, but I cannot really use the normal georeference method explained here:

https://www.qgistutorials.com/en/docs/georeferencing_basics.html

because I can't see the boundaries at all.
I tried to set up the georeference points manually, although even there I have to put them in the map and alternatively provide the coordinates manually.
My situation is somewhat upside down, because I can't see the image borders, but I know roughly the coordinates of its corners and the middle point. The problem is, that I don't know how to find it with the Georeferencer plugin.

I found some hints, which say, that the process is possible with GDAL:

How to geo-reference a tif image knowing corner coordinates

Georeference image using center point and size?

but the problem is, that I don't know how to run the GDAL console and where to put these values in.

The links beneath:

https://gdal.org/programs/gdalinfo.html

How to edit the GDAL/OGR console call in QGIS 3.0?

weren't helpful enough for me.

I am asking then about the possibility to georeference the PNG raster image in the situation, where borders aren't visible (the image includes transparent white background, so any styling couldn't work) but the coordinates of the corners and the middle point are known. Alternatively, is there an opportunity to see the image bounds in the GDAL georeferencer plugin?

UPDATE:

After typing in the OSGEO console

     gdal_translate -of GTiff -a_srs 'EPSG:<4326>' -a_ullr <-3> <52> <-2> <51> <C:\Users\k\Desktop\elrrachidia - fez\Viewshed\Heywhatsthat\BHX\cloakpN52W003.png> <C:\Users\k\Desktop\elrrachidia - fez\Viewshed\Heywhatsthat\BHX\cloakpN52W003.tif>

I am getting an error:

< was unexpected at this time

How I did wrong here?

Best Answer

Yes, just say that you work in meter, and the resolution of your png is 25 cm, and your png has no rotation. So your pgw file looks like that:

0.25

0.00

0.00

-0.25

2539000.049999999813735

1153999.949999999953434

Save it as name_of_your_png.rtf and change the extension to pgw. So it means:

  • Line 1: resolution in x (25 cm)
  • Line 2: no rotation in y
  • Line 3: no rotation in x
  • Line 4: resolution in y (25 cm)
  • Line 5: coordinate in x for the center of the upper left pixel (change it for fitting your case)
  • Line 6: coordinate in y for the center of the upper left pixel (change it for fitting your case)

When you load your PNG, no need to have GDAL.

Related Question