I want to assemble some species occurrence data from inat and GBIF for New Zealand using SPOCC.
I’d like to do that using a bounding box to cover NZ and offshore islands.
The obvious bounding box has the usual issue of failing because it crosses the 180/-180 meridian.
The solution, I assumed, was to provide two adjacent bounding boxes on either side of the meridian.
Here’s an example without too much data …
NZBox <- list(c(165,-53,180,-29),c(-180,-53,-175,-29)) spp <- c('Amanita muscaria','Chalciporus piperatus') out <- occ(query=spp, from=c('inat','gbif'), geometry=NZBox, has_coords = TRUE)
Unfortunately I get back records outside the combined boxes, in eastern Australia.
What am I doing wrong?