Bug report #17258

Custom CRS Definition dialog is unusable

Added by Anita Graser over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:Nyall Dawson
Category:GUI
Affected QGIS version:master Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25156

Description

The Custom CRS Definition dialog is a mess. Most of the time, I cannot make it save the new CRS I'm trying to add. At the same time, existing entries are duplicated on opening & closing the dialog.

Tested using OSGeo4W.

Associated revisions

Revision c8a62c5c
Added by Nyall Dawson over 6 years ago

Fix bad logic in custom projections dialog (fixes #17258)

History

#1 Updated by Anita Graser over 6 years ago

We have so many places in the GUI where entries are added to a list that work much better (e.g. in rule-based renderers).

This dialog was never good but now it's completely broken.

#2 Updated by Steven Mizuno over 6 years ago

Trying to better describe the problems...

After starting QGIS and loading a project this entry appears in the Custom Projections dialog

 * Generated CRS ()

It has no parameters and will provoke the following error message when you click OK: "The proj4 definition of ' * Generated CRS ()' is not valid." This prevents saving a newly created CRS or even just clicking OK to the dialog.

Another empty CRS is generated each time QGIS is started and a project is loaded, but within a QGIS session no further empty CRS is created (I believe the entry is being cached).

If this empty CRS is deleted using the [-] button you can exit the the dialog using OK. However, the existing entries are duplicated.

Also, when testing a CRS in the dialog the resulting coordinates don't make sense in some situations. I tried 45, -90 on a longlat CRS and got 0.7854, -1.5708. The result should be very near the input values. Using an omerc projected CRS got Error result; a tmerc projection may be correct - I haven't fully tested, but the result seemed reasonable. Note that the problem testing a CRS also occurs in 2.18.14 - I just checked.
On further research I found in the code for the custom projections dialog that the input for testing must be degrees latitude/longitude and the result is in projected units shows. And if a longlat CRS is used the result is in radians. This isn't very clear as the labels are North/East left of the input boxes rather than Lat/Long.

Further testing of trying to save a new CRS I find that this just does not work. I tried using the default name 'new CRS' and also changing this name to something else. The CRS shows in the list but is not saved.

But you can change an existing CRS (name, parameters) and it will be saved.

#3 Updated by Nyall Dawson over 6 years ago

  • Assignee set to Nyall Dawson

#5 Updated by Nyall Dawson over 6 years ago

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

Also available in: Atom PDF