Skip to content

Add snap to grid feature for raster export dialog. Fixes #43915 #62502

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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

lanckmann
Copy link
Contributor

Add snap to grid feature for raster export dialog. Fixes #43915

This PR adds a "Snap to grid" feature for the "Save Raster Layer as...", which automatically snaps the export extent to align with the input raster grid.

  • Adds a checkbox in the dialog (enabled by default)
  • Implements snapping in QgsExtentGroupBox
  • Unit tests

The issue requested in #43915.

@github-actions github-actions bot added this to the 3.46.0 milestone Jul 3, 2025
Copy link
Contributor

github-actions bot commented Jul 3, 2025

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 22503df)

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This installer is not signed, control+click > open the app to avoid the warning
(Built from commit 9a947f0)

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 9a947f0)

@DelazJ DelazJ modified the milestones: 3.46.0, 4.0.0 Jul 7, 2025
@@ -246,6 +246,7 @@ def testSetOutputCrs(self):
self.assertEqual(
w.outputExtent().toString(4), QgsRectangle(1, 2, 3, 4).toString(4)
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you forget to add a test here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) ! I forgot to commit it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Snap to grid" option for extent in Save Raster Layer as... dialog
3 participants