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

GDAL: make sure we are not reading outside the raster #34460

Merged
merged 2 commits into from
Feb 15, 2020

Conversation

elpaso
Copy link
Contributor

@elpaso elpaso commented Feb 13, 2020

Fixes #34435

Unfortunately I wasn't able to write a test for this
case: it seems to be related to a very rare combination
of floating point (double) rounding issues that I could
only reproduce manually.

But since I was trying to test it and I wrote some
raster block test cases, I thought it would be good
to leave them in the PR instead of throwing them
away.

The changes in the raster calculator are not strictly related
but they make the GPU and CPU path behave the same as
far as nodata are concerned, as was pointed out in
#34435, the behavior was different (the CPU path was the
good one).

@elpaso elpaso added Rasters Related to general raster layer handling (not specific data formats) Data Provider Related to specific vector, raster or mesh data providers Bug Either a bug report, or a bug fix. Let's hope for the latter! backport release-3_10 labels Feb 13, 2020
@nyalldawson
Copy link
Collaborator

Lgtm

... raster bounds.

Fixes qgis#34435

Unfortunately I wasn't able to write a test for this
case: it seems to be related to a very rare combination
of floating point (double) rounding issues that I could
only reproduce manually.

But since I was trying to test it and I wrote some
raster block test cases, I thought it would be good
to leave them in the PR instead of throwing them
away.
to be consistent to what happens in the CPU path
@elpaso elpaso force-pushed the bugfix-gh34435-raster-last-row-error branch from 80a1be8 to aa47fe3 Compare February 14, 2020 08:15
@m-kuhn m-kuhn closed this Feb 14, 2020
@m-kuhn m-kuhn reopened this Feb 14, 2020
@elpaso elpaso merged commit fc6e453 into qgis:master Feb 15, 2020
@elpaso elpaso deleted the bugfix-gh34435-raster-last-row-error branch February 15, 2020 18:25
@qgis-bot
Copy link
Collaborator

The backport to release-3_10 failed:

The process 'git' failed with exit code 128

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-release-3_10 release-3_10
# Navigate to the new working tree
cd .worktrees/backport-release-3_10
# Create a new branch
git switch --create backport-34460-to-release-3_10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick fc6e453385b0e200d8edc105426525d1387d43ad
# Push it to GitHub
git push --set-upstream origin backport-34460-to-release-3_10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_10

Then, create a pull request where the base branch is release-3_10 and the compare/head branch is backport-34460-to-release-3_10.

elpaso added a commit to elpaso/QGIS that referenced this pull request Feb 17, 2020
…row-error

GDAL: make sure we are not reading outside the raster
nyalldawson pushed a commit that referenced this pull request Feb 17, 2020
…error

GDAL: make sure we are not reading outside the raster
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! Data Provider Related to specific vector, raster or mesh data providers Rasters Related to general raster layer handling (not specific data formats)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raster calculator turns one row of pixels into nodata
4 participants