I am trying to learn my colleagues to display measured data (ASCII) in maps relatively easily. I can prepare project, color and symbology style for the point layer and background map.

I also found good way to get background map (PNG + world file) for offline use via MOBAC and OSM. MOBAC uses EPSG:3395 WGS 84 / World Mercator and I have the appropriate PRJ file. However, I found out, that QGIS does not use the PRJ for rasters and load them always using default CRS (in my case EPSG:4326).

Is it possible to make QGIS load the CRS settings from the PRJ (or other file) without need to set the CRS manually for every raster?


  • Hi, after QGIS upgrade I found out, that it reads the projection from the *.aux.xml file which MOBAC generates along with the *.pgw world file and the PNG image. Works out of the box for me (QGIS 1.7.4) - example file: dl.dropbox.com/u/6066212/Test_Prague.zip (600 kb). Really useful. :-)
    – Juhele
    Commented May 3, 2012 at 9:44
  • I am facing the same problem. I can't find way how to save information about CRS with JPG/PNG files. Well except of converting it to Geotif which is very inconvenient. Just wondering if there is some bettter option now in newer versions of QGIS?
    – Miro
    Commented Oct 8, 2014 at 1:24
  • Mmm, so it is only at stage "nice to have" after last 2 years... hub.qgis.org/issues/4236 Well, once I will get better with writing plugins for QGIS I could try to make plugin for this :)
    – Miro
    Commented Oct 8, 2014 at 1:32

2 Answers 2



(menu) Raster > Projections > Assign projection

This procedure writes CRS to file. Next time you load it QGIS will not ask you for a CRS.

  • Hi, but this requires converting all the maps to Geotiff - it increases the time I would have to spend with the map preparation...
    – Juhele
    Commented May 3, 2012 at 9:40

Hopefully it will be implemented one day (http://hub.qgis.org/issues/4236).

Meanwhile it is possible to use gdal_translate from within QGIS which creates *.aux.xml holding information about CRS (projection). Opened in text editor it looks like this:

  <SRS>PROJCS["WGS 84 / Pseudo-Mercator",...]</SRS>
  <GeoTransform> ... </GeoTransform>

This can be done only once for desired CRS (projection) - if in text editor you remove: <GeoTransform> ... </GeoTransform> which specifies location which must be loaded from specific world files for every image.

So what is needed (except existing *.wld file) is to create at least one *.aux.xml file with same file name as image and proper CRS definition (content as shortened example above). Then the file can be simply copied and renamed for all JPG/PNG files so for every file you have something like this:

image_01.jpg, image_01.jpg.aux.xml, image_01.wld

image_02.png, image_02.png.aux.xml, image_02.wld

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.