derived/r_bio-oracle_planarea.tif — a regional raster on 0-360
longitudes whose pixel values are v7 cell_ids.
Value
a terra::SpatRaster with a cell_id layer
Details
It is NOT version-neutral, despite the generic name. v8 uses a different grid
entirely: global, [-180,180], cell_id 1..24,293,128. Handing this raster
to cells_in_polygon() against a v8 database therefore yields ids that do
exist in v8 but denote completely different places — a polygon off Santa
Barbara resolved to cells in the Arctic, so species_for_cells() returned
zero species with no error at all. Prefer passing the DB connection to
cells_in_polygon(), which picks the right grid for the version it is
actually looking at.