Bug report #3537
CRS info in shapefile .prj is not taken into account by QGIS
|Affected QGIS version:||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||duplicate|
|Crashes QGIS or corrupts data:||Copied to github as #:||13597|
On loading a shapefile with associated prj file (no qpj file) the CRS in the prj file is ignored by QGIS.
How to reproduce:
- Unzip attached file (TestCRS.zip) into a folder
- Open the Google.qgs project (EPSG:900913 - OTF enabled).
- In Settings/Options->CRS tab select "Prompt for CRS"
(this option tells QGIS to ask the user to define the CRS of the
loaded file if, and only if, it is not defined in the file)
- Load the Town shapefile (note that there is a prj file defining the CRS - EPGS:32630)
- QGIS asks you to define its CRS. This is wrong.
- Remove the Town shapefile from the project
- Rename the prj file to qpj
- Load the Town shapefile again. You are not asked to define its CRS. Expected behaviour.
The same problem exists with the other two options "Project wide default CRS will be used" and "Global default CRS displayed below will be used".
If there is only a prj file (no qpj file) then QGIS silently changes the CRS of the Town shapefile to the CRS of the project or the Global default respectively. When OTF is on and the loaded shapefile is not in the same CRS as the project/default, it is located at the wrong place.
I have this problem when I want to import a shapefile (in a projected CRS) into a project having a Google Mercator CRS and OTF enabled.
This bug could be related to bug #3529.