Skip to contents

Flags records inside the Natural Earth 1:50 million urban-area polygons. CoordinateCleaner's clean_coordinates() leaves this test out by default, as urban records are often correct; here it runs whenever coordinates are present, and a cleaning rule can leave it out.

Usage

clean_urban(x, ...)

Arguments

x

A data frame of occurrence records.

...

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.

Fields

lon, lat.

CoordinateCleaner

Equivalent to cc_urb() with its default 1:50 million urban areas; identical flags on the same layer. Not run by clean_coordinates() by default either.

Custom gazetteer

gazetteers = list(urban = polygons), an sf or sfc object of urban-area polygons; see flag_occurrences().

Examples

x <- data.frame(decimalLongitude = c(16.37, 15.3), decimalLatitude = c(48.21, 47.5))
flag_occurrences(x, tests = "urban")$flag_urban
clean_urban(x)