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

Fixes for handling manual coordinate operations specified in projects #33370

Merged
merged 9 commits into from
Dec 13, 2019

Conversation

nyalldawson
Copy link
Collaborator

Refs, and probably fixes, #33121

With this branch, loading the project attached to #33121 results in the following default transformation:

image

This has been verified upstream at proj as being the correct default transformation result to use in this situation.

If the user manually opts to use an older, deprecated transformation via:

image

then the result is:

image

(as desired by the original poster)

from the proj string via the transform context

This isn't possible -- only proj coordinate operations constructed
from a src/dest CRS pair can be normalized, not those constructed
from a proj string.

It was redundant in any case, since we always normalize the available
operations before giving users a choice of them.

So just add some big bold warnings to the dox in case anyone is
manually manipulating and adding custom operations, that these
also MUST be pre-normalized

Refs qgis#33121, conversation in OSGeo/PROJ#1794
actually being used by a QgsCoordinateTransform object
by QgsCoordinateTransformContext.calculateCoordinateOperation corresponds
to the reverse of what's actually required.

Gross API, but it's the best we can do until proj has a method to
invert a coordinate operation so that we can return the proper
inverse operation proj string from calculateCoordinateOperation
(without resorting to fragile proj string parsing/mangling)
PROJ 6+ build and a project has manual coordinate operation pathways
set

Refs qgis#33121
@nyalldawson nyalldawson added Needs Backporting Bug Either a bug report, or a bug fix. Let's hope for the latter! Projections/Transformations Related to coordinate reference systems or coordinate transformation labels Dec 13, 2019
@nirvn
Copy link
Contributor

nirvn commented Dec 13, 2019

@nyalldawson , that transformation dialog's canvas is perfectly sized for Thailand :)

Great work!

@nyalldawson nyalldawson merged commit cf95f14 into qgis:master Dec 13, 2019
@nyalldawson nyalldawson deleted the fix_33121_proj_coordinateop branch December 13, 2019 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Needs Backporting Projections/Transformations Related to coordinate reference systems or coordinate transformation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants