ropensci / CoordinateCleaner

Automated flagging of common spatial and temporal errors in biological and palaeontological collection data, for the use in conservation, ecology and palaeontology.

Home Page:https://docs.ropensci.org/CoordinateCleaner/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR in p[, 2] - CoordinateCleaner::clean_coordinates()

mgaynor1 opened this issue · comments

if (is.null(ref)) {

This line needs to say
if(is.null(ref) | ncol(ref) = 0)

If the cropped region doesn't contain any capitals, an error will print (see photo). This can be fixed by modifying the if statement in cc_cap. Probably an issue throughout this code, sinceis.null(SpatVector)doesn't tell you if the vector is empty.

Screenshot 2023-09-27 at 4 36 28 PM

I

Hi, this is still an issue and we would love to update our package which uses CoordinateCleaner so that we remove our spatial dependency (which is only due to CoordinateCleaner <v3). However, with the updated version, this error => failed tests. Please fix!

HI @mgaynor1, thanks for reporting the issue. It is now fixed on the GitHub version, and will soon be on CRAN.

Thanks so much!