Skip to contents

Compute distance distribution of land cover types around a station to assess the WMO siting class

Usage

compute_landtype_distance(stn = NULL, landtype = NULL, f_plot = FALSE)

Arguments

stn

A SpatVector with station attributes from "get_latlon_frost"

landtype

A SpatVector with landtype attributes from "compute_landtype"

f_plot

A boolean whether to plot figures

Value

A distance distribution per land cover type

Examples

# Get station metadata
stn <- get_metadata_frost(stationid = 18700, dx = 100, resx = 1, path = NULL)

# Compute land type
landtype <- compute_landtype(stn, f_plot = TRUE)
#> [1] "Process: 18700 - 260966.8/6652718.0 - dtm - 100/1 - path: data/dem"
#> [1] "Load demo file: data/dem/18700_dtm_25833_d00100m_1.0m.tif"
#> [1] "Process: 18700 - 260966.8/6652718.0 - dom - 100/1 - path: data/dem"
#> [1] "Load demo file: data/dem/18700_dom_25833_d00100m_1.0m.tif"


# Compute land type distance to station
landtype_dist <- compute_landtype_distance(stn, landtype, f_plot = TRUE)
#> [1] "Process: 18700 - 260966.8/6652718.0 - dtm - 100/1 - path: data/dem"
#> [1] "Load demo file: data/dem/18700_dtm_25833_d00100m_1.0m.tif"