meteoland_points_interpolation: Current points (coordinates) interpolation

View source: R/lfcMeteoland.R

meteoland_points_interpolationR Documentation

Current points (coordinates) interpolation

Description

meteoland_points_interpolation is a wrapper for the $points_interpolation method of lfcMeteoland objects. See also meteoland.

Usage

meteoland_points_interpolation(object, sf, dates)

Arguments

object

lfcMeteoland object, as created by meteoland

sf

sf object with the the point features to interpolate.

dates

character vector of length 2 with the dates range (start-end) to interpolate (i.e. c("2020-04-25", "2020-04-30")). See details for more information.

.topo

optional custom SpatialPointsTopology object. If not provided topology will be retrieved from database (only for Catalonia)

Details

Dates must be provided as a two elements character vector, with the start date and the end date in a format accepted by as.Date. The allowed range for dates is one natural year (365 days) ending on the actual date minus one day. Interpolation for points is made based on a 30x30 meters topology grid.#'

Value

An sf object if .as_sf is TRUE (default), an SpatialPointsMetereology object (see SpatialPointsMetereology for more information) if .as_sf is FALSE.

See Also

Other Meteoland functions: meteoland_get_lowres_raster(), meteoland_historical_points_interpolation(), meteoland_raster_interpolation()

Examples

if (interactive()) {
  library(lfcdata)
  meteolanddb <- meteoland()
  sf_points <- nfi()$get_data('plots', spatial = TRUE) |>
  dplyr::slice(1:5) |>
  dplyr::select(plot_id)

  meteoland_points_interpolation(
    meteolanddb, sf_points, c(Sys.Date()-1, Sys.Date()-2)
  )
}



MalditoBarbudo/lfcdata documentation built on May 2, 2023, 10:30 p.m.