Point-in-polygon lookup: given longitude / latitude vectors (or an sf POINT
object), return the iso3c of the country each point falls in – the bridge
for getting point data (events, stations, observations) onto the country
spine so it can be joined, aggregated and mapped like everything else.
Arguments
- lon, lat
Numeric vectors of longitude / latitude (recycled together; ignored if
pointsis supplied).- points
Optional
sfPOINT object to use instead oflon/lat.- scale
Natural Earth resolution for the lookup geometry.
- add
Extra attributes to return alongside
iso3c(anyconvert_country()destination, e.g."country","continent").
