qc_check_coordinates: Site coordinates checking

View source: R/qc_coordinates_functions.R

qc_check_coordinatesR Documentation

Site coordinates checking

Description

qc_check_coordinates verifies if provided coordinates are within country declared in metadata form.

Usage

qc_check_coordinates(
  data,
  maps_folder = getwd(),
  plot = FALSE,
  parent_logger = "test"
)

Arguments

data

Data frame with data. At least, longitude, latitude, country and site name variables must be present in the data object.

maps_folder

Folder route where the maps are stored, by default the working directory. It must be a character object and it must end without /.

plot

Logical indicating if plots for coordinate are created and saved in the working directory. By default, plot are not saved.

Details

This function internally download the maps with qc_download_maps and it checks if the provided coordinates are within the country limits. It only creates a data frame containing country, site and a logical variable indicating if coordinates are correct.

Value

The data frame used as input with a new variable, is_inside_country, a logical variable indicating if the site has wrong coordinates

See Also

Other Quality Check Functions: qc_coord_sign_test(), qc_download_maps(), qc_fix_latlong_errors()


vflo/PSIsapfluxnetQC1 documentation built on Feb. 15, 2024, 3:19 a.m.