Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

thanks

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: dl.dropbox.com/u/6066212/Test_Prague.zip (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 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 Oct 8 at 1:32

2 Answers 2

Try:

(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

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

Meanwhile I create JPGs from TIF using gdal_translate and creation option -co WORDFILE=YES. It creates *.wld file plus *.aux.xml containing:

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

JPGs created this way are opened by QGIS straight (QGIS does not prompt for CRS). So what is needed (except *.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

 
discard

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.