Learn R Programming

bdc (version 1.1.6)

bdc_coordinates_outOfRange: Identify records with out-of-range geographic coordinates

Description

This function identifies records with out-of-range coordinates (not between -90 and 90 for latitude; between -180 and 180 for longitude).

Usage

bdc_coordinates_outOfRange(
  data,
  lat = "decimalLatitude",
  lon = "decimalLongitude"
)

Value

A data.frame containing the column ".coordinates_outOfRange". Compliant (TRUE) if 'lat' and 'lon' are not out-of-range; otherwise "FALSE".

Arguments

data

data.frame. Containing geographical coordinates. Coordinates must be expressed in decimal degrees and WGS84.

lat

character string. The column name with latitude in decimal degree and in WGS84. Default = "decimalLatitude".

lon

character string. The column with longitude in decimal degree and in WGS84. Default = "decimalLongitude".

See Also

Other prefilter: bdc_basisOfRecords_notStandard(), bdc_coordinates_country_inconsistent(), bdc_coordinates_empty(), bdc_coordinates_from_locality(), bdc_coordinates_transposed(), bdc_country_standardized(), bdc_scientificName_empty()

Examples

Run this code
x <- data.frame(
  decimalLatitude = c(-185.111, -43.34, "", -21.8069444),
  decimalLongitude = c(-45.4, -39.6, -20.5243, -440.9055555)
)

bdc_coordinates_outOfRange(
  data = x,
  lat = "decimalLatitude",
  lon = "decimalLongitude"
)

Run the code above in your browser using DataLab