Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix QgsCsException messages (LTR backport) #59543

Merged
merged 8 commits into from
Nov 21, 2024

Conversation

nyalldawson
Copy link
Collaborator

Manual backport of #59484

We were incorrectly showing the "transformed" coordinate result
in the exception message, which usually ended up inf, inf after
the transform fails. This lead to a useless 'forward transform of
(inf, inf)' message in the exception, which was misleading
as it looks like we were trying to transform a (inf, inf) point.

Now we get the (useful!) actual coordinate we were trying
to transform in the exception message.

(cherry picked from commit c8d25f6)
The old code mistakenly assumed that proj error codes were all
values < 0, which they haven't been since proj 8.0

This meant all QgsCsExceptions were incorrectly including
"Error: Fallback transform failed", instead of the actual
error message from proj.

Now we get eg "Forward transform of (-7603859.000000, -7324441.000000)
Error: Invalid coordinate", which makes much more sense

(cherry picked from commit 00c7268)
Eg:

    Forward transform (EPSG:4326 to EPSG:3857) of
    (-7603859.000000, -7324441.000000) Error: Invalid coordinate

(cherry picked from commit 9b69caf)
(cherry picked from commit b682d36)
@nyalldawson nyalldawson added the Backport Is a backport of another pull request label Nov 21, 2024
@github-actions github-actions bot added this to the 3.42.0 milestone Nov 21, 2024
@troopa81 troopa81 merged commit 5299842 into qgis:queued_ltr_backports Nov 21, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport Is a backport of another pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants