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

[Processing] creategrid: Allow negative overlay #57709

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

lbartoletti
Copy link
Member

Description

The creategrid algorithm had a limit of 0 to 1000000000.0. I'm removing this limitation to go beyond this maximum limit, but above all to allow a negative limit, which in fact allows an empty space (the opposite of superposition).

Graphically, this allows:

image

cc @florentfgrs
Sponsored by: Oslandia and Elements

The creategrid algorithm had a limit of 0 to 1000000000.0.
I'm removing this limitation to go beyond this maximum limit, but above all to
allow a negative limit, which in fact allows an empty space
(the opposite of superposition).
@lbartoletti lbartoletti self-assigned this Jun 7, 2024
@github-actions github-actions bot added this to the 3.38.0 milestone Jun 7, 2024
@lbartoletti lbartoletti added Processing Relating to QGIS Processing framework or individual Processing algorithms Easy fix backport queued_ltr_backports Queued Backports backport release-3_34 and removed backport release-3_34 labels Jun 7, 2024
Copy link

github-actions bot commented Jun 7, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 2fc7dfe)

@lbartoletti lbartoletti enabled auto-merge (rebase) June 7, 2024 13:19
@@ -110,8 +110,8 @@ QVariantMap QgsGridAlgorithm::processAlgorithm( const QVariantMap &parameters, Q
if ( mGridExtent.height() < mVSpacing ) //check if grid extent is smaller than vertical spacing
throw QgsProcessingException( QObject::tr( "Vertical spacing is too large for the covered area." ) );

if ( mHSpacing <= mHOverlay || mVSpacing <= mVOverlay )
throw QgsProcessingException( QObject::tr( "Invalid overlay: horizontal: '%1', vertical: '%2'" ).arg( mHOverlay ).arg( mVOverlay ) );
// if ( mHSpacing <= mHOverlay || mVSpacing <= mVOverlay )
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's just remove these lines

@lbartoletti lbartoletti merged commit 015e065 into qgis:master Jun 7, 2024
43 checks passed
@qgis-bot
Copy link
Collaborator

qgis-bot commented Jun 7, 2024

The backport to queued_ltr_backports failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 2fc7dfeca70... [Processing] creategrid: Allow negative overlay
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging python/plugins/processing/tests/testdata/qgis_algorithm_tests5.yaml
CONFLICT (content): Merge conflict in python/plugins/processing/tests/testdata/qgis_algorithm_tests5.yaml
Auto-merging src/analysis/processing/qgsalgorithmgrid.cpp

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-57709-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 2fc7dfeca70030d152502692ab49c36bfc3e3e53
# Push it to GitHub
git push --set-upstream origin backport-57709-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backports

Then, create a pull request where the base branch is queued_ltr_backports and the compare/head branch is backport-57709-to-queued_ltr_backports.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport queued_ltr_backports Queued Backports Easy fix failed backport The automated backport attempt failed, needs a manual backport Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants