Bug report #17455

vector layer properties: Wrong CRS reported in the Informations and Metadata tabs

Added by Harrissou Santanna about 7 years ago. Updated over 6 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Metadata
Affected QGIS version:master Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:25352

Description

In the Vector Layer Properties, either in the Information tab or Metadata --> Extent one, QGIS reports the layer to be in EPSG:4326 while it's in EPSG:2154.
No data is in 4326 (actually all are in 2154) and the project is also in 2154

wrong_crs.PNG - provider reports 2154 while 4326 is mentioned at the bottom of the dialog (11 KB) Harrissou Santanna, 2017-11-14 11:45 AM

Associated revisions

Revision bf45d0b6
Added by Etienne Trimaille almost 7 years ago

Crs (#5908)

  • fix display of CRS if invalid CRS
  • fix #17455 set an empty CRS if the read CRS from XML is wrong
  • add warning about empty CRS node when reading XML

History

#1 Updated by Giovanni Manghi about 7 years ago

  • Priority changed from Normal to High
  • Regression? changed from No to Yes

#2 Updated by Steven Mizuno about 7 years ago

There is a separate setting for CRS in the Metadata tab, in the Extents tab on the right-hand side of the dialog. This is not set to anything meaningful, but there is a button to set CRS from layer. But it would be much better if this was the default so the user doesn't have to set this.

This information has separate storage in the project file.

Further, the Information tab is not updated after the Extents tab is updated, until Apply is executed. You have to switch away from the Information tab, then back to it, or OK the dialog and then open it again to see the change.

Still more confusing is that the Extents sub-tab in the Metadata tab does not have any indication or place to set spatial or temporal extent (which the heading at the top indicates what this tab is for). And the extent part of the Information tab is blank.

#3 Updated by Etienne Trimaille about 7 years ago

Harrissou, did you set another CRS in the metadata wizard?
This CRS is coming from only the metadata wizard.

Steven, the setting in the metadata wizard has no link with the map layer CRS.
Copy/paste from https://qgis.org/api/classQgsLayerMetadata.html#a505921e4bbdce896a66edae02c738567

While in most cases these two systems are likely to be identical, it is possible to have a layer with a different CRS described by it's accompanying metadata versus the CRS which is actually used to display and manipulate the layer within QGIS. This may be the case when a layer has an incorrect CRS within its metadata and a user has manually overridden the layer's CRS within QGIS.

Further, the Information tab is not updated after the Extents tab is updated, until Apply is executed.

This is still in progress in QEP 91 Work package 3 https://github.com/qgis/QGIS-Enhancement-Proposals/issues/91
There is an open PR about small patch to save metadata to its own file

About Extents, the form is hidden in the wizard until it's finished.

#4 Updated by Giovanni Manghi about 7 years ago

  • Status changed from Open to Feedback

#5 Updated by Harrissou Santanna about 7 years ago

Harrissou, did you set another CRS in the metadata wizard?
This CRS is coming from only the metadata wizard.

Hi Etienne. Indeed I didn't set the CRS in metadata wizard. I expected the CRS would be derived from data (ie the one set in QGIS CRS dialog). I always thought that these were kind of information user does not need to manually fill in metadata (but i must confess that i didn't fill metadata for about a decade now)
What I don't understand is why the CRS in the metadata wouldn't be the same as the one recognized by QGIS. In case the CRS mentioned in QGIS is right, then all is good. If wrong then the user must edit it and fill the right one so that the metadata is filled with that value.

I'm afraid that with the current implementation, people provides data with metadata containing wrong/unrelated CRS information.

#6 Updated by Giovanni Manghi about 7 years ago

  • Status changed from Feedback to Open

#7 Updated by Etienne Trimaille about 7 years ago

I agree it should display a warning if both CRS from the layer and CRS from metadata are not the same.

The CRS derived from the data is displayed in the `Provider` section.

#8 Updated by Etienne Trimaille almost 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

#9 Updated by Etienne Trimaille almost 7 years ago

Steven Mizuno wrote:

Still more confusing is that the Extents sub-tab in the Metadata tab does not have any indication or place to set spatial or temporal extent (which the heading at the top indicates what this tab is for). And the extent part of the Information tab is blank.

It has been fixed too. There is now a Spatial Extent and a Temporal Extent

#10 Updated by Giovanni Manghi over 6 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF