geodata
geodata copied to clipboard
`sp_occurrence()` fails when `end>100000`
If end
>100,000, an error message is shown, even if start
is large enough for the total number of records to be OK:
sp_occurrence(genus = "Lutra", download = FALSE)
[1] 243745
sp_occurrence(genus = "Lutra", start=100000, end=100001)
# Error in sp_occurrence(genus = "Lutra", start = 1e+05, end = 100001) :
GBIF does not allow using this service for record numbers that are > 100,000
I submitted a pull request (#62) that seems to fix that. After applying that fix, the download does start, but then seems to fail under most circumstances, though not all - ignore the wacky reported number of downloaded records, which is the subject of a separate issue (#64):
sp_occurrence(genus = "Lutra", start = 99999, end=100001) # OK:
# 3 records found
# 99998-100001
# 100001 records downloaded
# acceptedNameUsageID acceptedScientificName [...]
# 1 urn:lsid:dyntaxa.se:Taxon:100077 Lutra lutra (Linnaeus, 1758) [...]
# 2 urn:lsid:dyntaxa.se:Taxon:100077 Lutra lutra (Linnaeus, 1758) [...]
# 3 urn:lsid:dyntaxa.se:Taxon:100077 Lutra lutra (Linnaeus, 1758) [...]
sp_occurrence(genus = "Lutra", start = 99999, end=100002)
# 4 records found
# 99998-download failed
# NULL