-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Always fallback to default coordinate operations when bounding box transfrom fails #60759
base: master
Are you sure you want to change the base?
Conversation
…ansfrom fails Bounding box transforms are inherently approximate, so we can safely just fallback to the proj default operation if the user-specified operation fails when transforming a bounding box. This fixes cases where the user-specified operation involves a grid shift and the bounds to transform falls outside of the grid. In this case proj_trans_bounds fails. By falling back to a proj default operation and re-trying then we get a valid approximate transformation of the bounding box. Fixes map rendering issues when users are using a grid shift operation to transform layers to map CRS Fixes qgis#60737 Fixes qgis#60753
9925e29
to
5a330ed
Compare
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
@@ -127,6 +127,51 @@ def testTransformQgsRectangle_Regression17600(self): | |||
myTransformedExtentReverse.yMinimum(), myExtent.yMinimum() | |||
) | |||
|
|||
def test_transform_bounding_box_grid(self): | |||
""" | |||
This test assumes the ca_nrc_NA83SCRS.tif grid is available on the system! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, can you skip the test if ca_nrc_NA83SCRS.tif is not available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know any way to determine that reliably. (The test will just silently pass if the grid isn't available, as the default operation will always be used).
At least on the Qt 6 Fedora builds the grids are installed, I'm not sure about the Qt5 CI runs
Bounding box transforms are inherently approximate, so we can safely just fallback to the proj default operation if the user-specified operation fails when transforming a bounding box.
This fixes cases where the user-specified operation involves a grid shift and the bounds to transform falls outside of the grid. In this case proj_trans_bounds fails. By falling back to a proj default operation and re-trying then we get a valid approximate transformation of the bounding box.
Fixes map rendering issues when users are using a grid shift operation to transform layers to map CRS
Fixes #60737
Fixes #60753