Opened 13 years ago

Closed 13 years ago

#3537 closed bug (duplicate)

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

Reported by: benoitrsa Owned by: nobody
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Projection Support Version: Trunk
Keywords: CRS, Shapefile, PRJ, QPJ Cc:
Must Fix for Release: Yes Platform: Windows
Platform Version: Win7, WinXP & Mac OS X Awaiting user input: no

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.

Attachments (1)

TestCRS.zip (1.7 KB ) - added by benoitrsa 13 years ago.
A QGIS project and a shapefile

Download all attachments as: .zip

Change History (2)

by benoitrsa, 13 years ago

Attachment: TestCRS.zip added

A QGIS project and a shapefile

comment:1 by benoitrsa, 13 years ago

Resolution: duplicate
Status: newclosed

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

Note: See TracTickets for help on using tickets.