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 cc_sea when using seas_ref = buffland

jaum20 opened this issue · comments

cc_sea(df, lon = "decimalLongitude.new1",
lat = "decimalLatitude.new1", ref = buffland)

Testing sea coordinates
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘geomtype’ for signature ‘"PackedSpatVector"’

If I omit ref = buffland, it works fine

As per the ?cc_sea help file, ref should be a SpatVector of polygons. And, like your error message says, the method is not impemented for a PackedSpatVector. Try unpacking it first with buffland <- terra::unwrap(buffland).

I am almost sure this was not necessary in the 2.0 version. Thank you