Skip to contents

Compute land cover types around a station based on retrieved topographic data (buildings, roads, water) and digital terrain/surface models (to compute vegetation height and classify: grass, bush, tree) from Kartverket. The horizontal resolution of the digital elevation models defines the resolution of the tile of the topographic data.

Usage

compute_landtype(stn = NULL, f_plot = FALSE)

Arguments

stn

A SpatVector with station attributes from "get_latlon_frost"

f_plot

A boolean whether to plot the land cover types

Value

A SpatVector of land cover types

Examples

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

# Compute land cover
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"

#>  class       : SpatVector 
#>  geometry    : polygons 
#>  dimensions  : 7, 1  (geometries, attributes)
#>  extent      : 260865.8, 261067.2, 6652618, 6652819  (xmin, xmax, ymin, ymax)
#>  coord. ref. : ETRS89 / UTM zone 33N (EPSG:25833) 
#>  names       : landtype
#>  type        :   <fact>
#>  values      :     tree
#>                    bush
#>                    crop