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

Basedata raster imports shifted south by one pixel #845

Closed
shawnlaffan opened this issue Jan 30, 2023 · 1 comment
Closed

Basedata raster imports shifted south by one pixel #845

shawnlaffan opened this issue Jan 30, 2023 · 1 comment
Assignees
Milestone

Comments

@shawnlaffan
Copy link
Owner

shawnlaffan commented Jan 30, 2023

The y-coordinates for groups imported from raster files are offset by one pixel southwards. The issue is that the half pixel distance is subtracted from instead of being added when calculating the final cell coordinate.

This is a long standing bug. The main impact is where data are imported from multiple sources, e.g. raster and shapefile. Otherwise the cells will be consistently shifted so any calculations are consistently offset (think of it as a spatially global error for an internally consistent data set). Another point of impact is where shapefiles are used to define regions in spatial conditions when analysing such offset basedatas. It is unclear how common this is.

Update: This only affects north-oriented rasters, i.e. those that list the rows of the raster from the bottom up. Most do the reverse, i.e. the top row is listed first in the file.

Update 2: Nope, this affected a range of files, not just north orientated

@shawnlaffan shawnlaffan added this to the Release_4.1 milestone Jan 30, 2023
@shawnlaffan shawnlaffan self-assigned this Jan 30, 2023
@shawnlaffan shawnlaffan changed the title Basedata raster imports shifted south by one pixel Basedata raster imports shifted south by one pixel - affects north oriented files Jan 31, 2023
shawnlaffan added a commit that referenced this issue Jan 31, 2023
This boils down to south-oriented files needing to be
shifted down half a basedata cell while south oriented files
are shifted up.

Updates #845
shawnlaffan added a commit that referenced this issue Jan 31, 2023
This is a cleaner way of addressing #845
@shawnlaffan shawnlaffan changed the title Basedata raster imports shifted south by one pixel - affects north oriented files Basedata raster imports shifted south by one pixel Jan 31, 2023
@shawnlaffan
Copy link
Owner Author

Changes are on master. CI failure is a server timeout.

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

No branches or pull requests

1 participant