Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
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: (600 kb). Really useful. :-) – Juhele May 3 '12 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 Oct 8 '14 at 1:24
Mmm, so it is only at stage "nice to have" after last 2 years... Well, once I will get better with writing plugins for QGIS I could try to make plugin for this :) – Miro Oct 8 '14 at 1:32


(menu) Raster > Projections > Assign projection

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

share|improve this answer
Hi, but this requires converting all the maps to Geotiff - it increases the time I would have to spend with the map preparation... – Juhele May 3 '12 at 9:40

Hopefully it will be implemented one day (

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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