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

Would be nice if cc_sea could cache the shapefile

rvosa opened this issue · comments

Very cool, very useful package!

I'm using it now to iterate through a (large) list of files and I'm noticing that the ESRI shapefile for ne_110m_land is being downloaded every time and stored in a tmp folder. It would be nice (quicker) if you could optionally specify a fixed location for this file as an argument to the cc_sea() function call so that it could be reused.

Cheers,

Rutger

Hi,

cc_sea has a ref argument, which should help here. Does the following work for you:

test <- data.frame(decimallongitude = -30, decimallatitude = 10, species = "loxodonta africana")

reference <- rnaturalearth::ne_download(scale = 110, type = 'land', category = 'physical')

for(i in 1:100){
  print(i)
  cc_sea(test, ref = reference)
}