Bug report #3547
On loading a layer: CRS behaviour does not work as expected for shapefiles and geotiffs no created 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 #:||13607|
When loading a shapefile not created by QGIS (e.g. not having a .qpj file, but only a .prj) or when loading a geotiff file (having a CRS meta block, as reported by GDAL) into QGIS their respective CRS (in the .prj file for the shapefile, and in the meta block for the geotiff) are ignored by QGIS.
On loading a layer that do not have a CRS into QGIS there are three options: 1) ask user, 2) use project default CRS, and, 3) use QGIS default CRS.
One of those options should only be active if the loaded layer does not have a CRS.
For shapefile, QGIS does not recognise the .prj file. QGIS needs the qpj to recognise that the layer has a CRS.
For geotiff, QGIS does not recognise the CRS in the meta block of the file.
- When option 1) is in effect, QGIS asks the user for a CRS.
- When option 2) is on, QGIS silently sets the CRS of the shapefile or geotiff to the project CRS.
- When option 3) is on, QGIS silently sets the CRS of the shapefile or geotiff to the default CRS.
Thus, when options 2) or 3) are active, the layer is located at the wrong place, if its "true" CRS is different from the project or default CRS respectively.
When option 1) is active, it is a pain to be asked for a CRS.