OccurrencesInterface

OccurrencesInterface.absencesMethod
absences(c::T) where {T<:AbstractOccurrenceCollection}

Returns an Occurrences where only the occurrences in the initial collection for which presence evaluates to false are kept.

source
OccurrencesInterface.dateMethod
date(o::Occurrence)

Returns the date (technically a DateTime object) documenting the time of occurrence event. Can be missing if not known.

source
OccurrencesInterface.dateMethod
date(::AbstractOccurrence)

Default method for any abstract occurrence type for the date operation. Unless overloaded, this returns nothing.

source
OccurrencesInterface.dateMethod
date(::AbstractOccurrenceCollection)

Default method for any abstract occurrence collection type for the date operation. Unless overloaded, this returns an array of date on all elements of the argument.

source
OccurrencesInterface.elementsMethod
elements(::T) where {T<:AbstractOccurrenceCollection}

Returns the elements contained in an abstract collection of occurrences – this must be something that can be iterated. The default value, when unimplemented, is nothing.

source
OccurrencesInterface.entityMethod
entity(::AbstractOccurrence)

Default method for any abstract occurrence type for the entity operation. Unless overloaded, this returns nothing.

source
OccurrencesInterface.entityMethod
entity(::AbstractOccurrenceCollection)

Default method for any abstract occurrence collection type for the entity operation. Unless overloaded, this returns an array of entity on all elements of the argument.

source
OccurrencesInterface.placeMethod
place(o::Occurrence)

Returns the place of the occurrence event, either as a tuple of float in the longitude, latitude format, or as missing. The CRS is assumed to be WGS84 with no option to change it. This follows the GeoJSON specification.

source
OccurrencesInterface.placeMethod
place(::AbstractOccurrence)

Default method for any abstract occurrence type for the place operation. Unless overloaded, this returns nothing.

source
OccurrencesInterface.placeMethod
place(::AbstractOccurrenceCollection)

Default method for any abstract occurrence collection type for the place operation. Unless overloaded, this returns an array of place on all elements of the argument.

source
OccurrencesInterface.presenceMethod
presence(o::Occurrence)

Returns a Bool for the occurrence status, where true is the presence of the entity and false is the (pseudo)absence.

source
OccurrencesInterface.presenceMethod
presence(::AbstractOccurrence)

Default method for any abstract occurrence type for the presence operation. Unless overloaded, this returns nothing.

source
OccurrencesInterface.presenceMethod
presence(::AbstractOccurrenceCollection)

Default method for any abstract occurrence collection type for the presence operation. Unless overloaded, this returns an array of presence on all elements of the argument.

source
OccurrencesInterface.presencesMethod
presences(c::T) where {T<:AbstractOccurrenceCollection}

Returns an Occurrences where only the occurrences in the initial collection for which presence evaluates to true are kept.

source
OccurrencesInterface.OccurrenceType
Occurrence

This is a sub-type of AbstractOccurrence, with the following types:

  • what - species name, defaults to ""
  • presence - a boolean to mark the presence of the species, defaults to true
  • where - a tuple giving the location as longitude,latitude in WGS84, or missing, defaults to missing
  • when - a DateTime giving the date of observation, or missing, defaults to missing

When the interface is properly implemented for any type that is a sub-type of AbstractOccurrence, there is an Occurrence object can be created directly with e.g. Occurrence(observation). There is, similarly, an automatically implemented convert method.

source
OccurrencesInterface.OccurrenceMethod
Occurrence(t::T) where {T<:AbstractOccurrence}

Given a type that is a subtype of AbstractOccurrence, constructs an Occurrence object using the methods in the interface. This should not be overloaded in other packages.

source