Two tests set the land test against the habitat of the record's genus:
sea_nonmarineflags records outside the land polygons whose genus does not live in the sea (a tree or a toad in open water);land_marineflags records inside the land polygons whose genus lives only in the sea (a starfish or a coral inland).
Arguments
- x
A data frame of occurrence records.
- buffer
Buffer distance of the test, in the unit of its Buffer section; the default is the test's default buffer.
- ...
Further arguments to
flag_occurrences():columns,reference,gazetteers,land_scale.
Value
clean_<test>(): the rows of x the test does not flag, with the
columns of x unchanged. See keep_unflagged(), Cleaning functions.
Details
The genus habitats come from the Interim Register of Marine and Nonmarine
Genera (IRMNG; Rees, T. (compiler) (2026). The Interim Register of Marine
and Nonmarine Genera. Available from https://www.irmng.org at VLIZ; CC BY
4.0), see reference_habitat() for how a genus is classed. Records of a
genus IRMNG does not class (missing flags, or both habitats, as for gulls,
seals, salmon or mangroves) are not tested. The genus is the first word of
the genus field, so a binomial species column works too; a kingdom
column, when present, resolves genus names used in two kingdoms. The land
is the layer of sea: land_scale, or gazetteers$sea.
A coarse coast puts coastal records on the wrong side: at the default
land_scale = 110 the coastline is generalised by kilometres. The buffers
leave records within that distance of the coast untested.
Marine fossils of a living marine genus lie on land too; combine with
basis_fossil in a rule to keep them.
Custom gazetteer
gazetteers = list(habitat = <data frame>) with
columns genus, marine (logical: TRUE only marine, FALSE not
marine) and optionally kingdom; gazetteers = list(sea = <sf>) replaces
the land.
CoordinateCleaner
Not in CoordinateCleaner, whose cc_sea()
flags every record off the land, marine or not.
See also
flag_occurrences(), flag_tests(), reference_habitat(), test_sea
Other tests:
clean_age_equal(),
clean_age_outlier(),
clean_age_range_outlier(),
clean_aohi(),
clean_basis_fossil(),
clean_capital(),
clean_centroid(),
clean_country_mismatch(),
clean_dataset_ddmm(),
clean_dataset_rounded(),
clean_duplicate(),
clean_equal(),
clean_establishment_introduced(),
clean_gbif_headquarters(),
clean_institution(),
clean_invalid(),
clean_issue_coordinate(),
clean_outlier(),
clean_range(),
clean_sea(),
clean_spatiotemporal_outlier(),
clean_urban(),
clean_zero()
Examples
x <- data.frame(kingdom = c("Plantae", "Animalia", "Animalia", "Plantae"),
genus = c("Quercus", "Asterias", "Asterias", "Quercus"),
decimalLongitude = c(-30, 16.37, -30, 16.37),
decimalLatitude = c(40, 48.21, 40, 48.21))
f <- flag_occurrences(x, tests = c("sea", "sea_nonmarine", "land_marine"))
f[, c("genus", "flag_sea", "flag_sea_nonmarine", "flag_land_marine")]
clean_sea_nonmarine(x)