I'm downloading non-georeferenced .png image files from a WMS in a grid of 5x5. The corners of the boundingbox are known and now I want to automatically georeference these files. What is the fastest way to do this? Should I go for a world file (and how?) or should I just georeference every image on its own (and how?).

The tiles will be downloaded every day again and used for detecting the changed regions.


I succeeded in doing this using a world file for each image.

I'm requesting tiles with a certain bounding box in WGS84 being: N, E, S, W. I also specify the resolution of the images in pixels: pxX and pxY. Then I generate my world file for each image (image_1.png + image_1.wld);

(E - W) / pxX
- (N - S) / pxY

By just drag and dropping the images in qGIS, the world file is automatically recognized and the image is displayed properly. My only remaining question: why should I assign a negative sign on the second line?

  • You need the negative sign, because the image (0,0) Point is at the upper left corner of the image. – Andreas W. Bartels Jul 3 '17 at 9:36
  • And that is specified in the file format. But then why doesn't the format takes that into account automatically? Is there a good reason why it's done like that. I assume it's just for sizing the pixels correctly, but now it takes into account double the overall geometry? OR, is it also possible to specify the lower left corner and do it in positive sign? – Willem van Opstal Jul 3 '17 at 11:22
  • 1
    normaly the (0,0) corner definition comes with it's format, for example mapbox tile cache use the lower left corner. But the normal case is that (0,0) point corner is the upper left. That's like the display or canvas and makes the rendering easier. The values are the affintransformation parameter. From image to real world. scale x rotate x, rotate y, mirror and scale y and translation x, y – Andreas W. Bartels Jul 3 '17 at 12:58

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.