Bug report #3537

CRS info in shapefile .prj is not taken into account by QGIS

Added by Benoit de Cabissole almost 10 years ago. Updated over 9 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Projection Support
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

Description

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.

TestCRS.zip - A QGIS project and a shapefile (1.71 KB) Benoit de Cabissole, 2011-03-01 09:19 PM

History

#1 Updated by Benoit de Cabissole over 9 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

This ticket has been superseded by #3547, and is now closed.

Also available in: Atom PDF