Bug report #1928

Custom CRS def'n fails if name contains an apostrophe

Added by hamish - about 10 years ago. Updated over 7 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Projection Support
Affected QGIS version:master Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied:No Resolution:upstream
Crashes QGIS or corrupts data:No Copied to github as #:11988

Description

Hi,

Using 1.2.0 I am trying to define a custom CRS. In this case it is OpenStreetMap data which uses the infamous "Google Mercator on Sphere" projection.

from /usr/share/proj/esri.extra it is defined as:

#
#  Chris' funny epsgish code for the google mercator
#
<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 \\
  +x_0=0.0 +y_0=0 +k=1.0 +units=m [email protected] +wktext  +no_defs <>

After some experimenting I figure out that I need to click on the little yellow flash icon (tooltips! please!), then cut and paste the name and the +proj terms (without the <>) and click the disk/save button. But it is silently not accepted.

After some more experimenting I find that the rather subtle indicator of success is that the "x of y" text has to increment. (A popup warning that it failed would be nice.)

After even more experimenting I find that the cause of the trouble is the apostrophe in Chris's. If I remove that I can add the new custom CRS ok. Some string quoting problem I guess.

In spite of its dubious nature, as this is now a pretty common projection it might be useful to add it to the master list of available CRSs.

thanks,
Hamish

History

#1 Updated by Giovanni Manghi almost 8 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#2 Updated by Paolo Cavallini over 7 years ago

  • Crashes QGIS or corrupts data set to No
  • Affected QGIS version set to master
  • Target version changed from Version 1.7.4 to Version 1.8.0

#3 Updated by Jürgen Fischer over 7 years ago

  • Pull Request or Patch supplied set to No
  • Resolution set to upstream
  • Assignee deleted (nobody -)
  • Status changed from Open to Closed

QGIS itself doesn't parse the PROJ.4 files. So if the issue still exists, it must be an upstream problem.

Also available in: Atom PDF