shawnlaffan/biodiverse

Basedata raster imports shifted south by one pixel

shawnlaffan opened this issue · 1 comments

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

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