-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
🏖️ low effortIssue that can be tackled without too much problemIssue that can be tackled without too much problem📦 SDTLikely to be solved in the top-level packageLikely to be solved in the top-level package🤗 good first PRIssue that's small / straightforward enough to be a good first PRIssue that's small / straightforward enough to be a good first PR
Description
Currently, calculating the boundingbox for a set of occurrences returns a tuple with missing
elements, if some occurrences do not have coordinates — this happens when GBIF requests don't use the hasCoordinate
flag, for example.
So it seems like something should be wrapped into a skipmissing
This will most likely take place here:
SpeciesDistributionToolkit.jl/src/boundingbox.jl
Lines 18 to 22 in 1ddcffd
function boundingbox(occ::AbstractOccurrenceCollection; padding=0.0) | |
left, right = extrema(longitudes(occ)) | |
bottom, top = extrema(latitudes(occ)) | |
return _padbbox(left, right, bottom, top, padding) | |
end |
The lon/lat are returned from the following methods
SpeciesDistributionToolkit.jl/src/latlon.jl
Lines 1 to 19 in 1ddcffd
""" | |
longitudes(o::AbstractOccurrence) | |
Returns the longitude for a single occurrence | |
""" | |
longitudes(o::T) where {T <: AbstractOccurrence} = ismissing(place(o)) ? missing : first(place(o)) | |
""" | |
latitudes(o::AbstractOccurrence) | |
Returns the latitude for a single occurrence | |
""" | |
latitudes(o::T) where {T <: AbstractOccurrence} = ismissing(place(o)) ? missing : last(place(o)) | |
longitudes(o::T) where {T <: AbstractOccurrenceCollection} = longitudes.(elements(o)) | |
latitudes(o::T) where {T <: AbstractOccurrenceCollection} = latitudes.(elements(o)) | |
longitudes(o::Vector{<:T}) where {T <: AbstractOccurrence} = longitudes.(o) | |
latitudes(o::Vector{<:T}) where {T <: AbstractOccurrence} = latitudes.(o) |
Metadata
Metadata
Assignees
Labels
🏖️ low effortIssue that can be tackled without too much problemIssue that can be tackled without too much problem📦 SDTLikely to be solved in the top-level packageLikely to be solved in the top-level package🤗 good first PRIssue that's small / straightforward enough to be a good first PRIssue that's small / straightforward enough to be a good first PR
Type
Projects
Status
Todo