Skip to contents

The land cover data shows us how much of the region is covered by forests, rivers, wetlands, barren land, or urban infrastructure thus allowing the observation of land cover dynamics over a period of time. This function allows to efficiently calculate area of different landcover classes for polygons. For each polygon, the area of the classes in hectare(ha) is returned.

Usage

calc_landcover()

Value

A function that returns tibble with a column for area (in ha) and the percentage covered per landcover class.

Details

The required resources for this indicator are:

Examples

# \dontshow{
mapme.biodiversity:::.copy_resource_dir(file.path(tempdir(), "mapme-data"))
# }
# \dontrun{
library(sf)
library(mapme.biodiversity)

outdir <- file.path(tempdir(), "mapme-data")
dir.create(outdir, showWarnings = FALSE)

mapme_options(
  outdir = outdir,
  verbose = FALSE
)

aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg",
  package = "mapme.biodiversity"
) %>%
  read_sf() %>%
  get_resources(get_esalandcover(years = 2016:2017)) %>%
  calc_indicators(calc_landcover()) %>%
  tidyr::unnest(landcover)

aoi
#> Simple feature collection with 22 features and 9 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -71.80933 ymin: 18.57668 xmax: -71.33201 ymax: 18.69931
#> Geodetic CRS:  WGS 84
#> # A tibble: 22 × 10
#>    WDPAID NAME           DESIG_ENG ISO3  assetid classes year    area percentage
#>     <dbl> <chr>          <chr>     <chr>   <int> <chr>   <chr>  <dbl>      <dbl>
#>  1 478140 Sierra de Nei… National… DOM         1 shrubs  2016  5.06e2  0.0260   
#>  2 478140 Sierra de Nei… National… DOM         1 herbac… 2016  1.84e3  0.0943   
#>  3 478140 Sierra de Nei… National… DOM         1 cropla… 2016  1.15e0  0.0000590
#>  4 478140 Sierra de Nei… National… DOM         1 closed… 2016  4.65e3  0.239    
#>  5 478140 Sierra de Nei… National… DOM         1 closed… 2016  1.03e1  0.000531 
#>  6 478140 Sierra de Nei… National… DOM         1 closed… 2016  4.98e3  0.256    
#>  7 478140 Sierra de Nei… National… DOM         1 closed… 2016  1.46e2  0.00750  
#>  8 478140 Sierra de Nei… National… DOM         1 open_f… 2016  1.90e3  0.0977   
#>  9 478140 Sierra de Nei… National… DOM         1 open_f… 2016  8.85e1  0.00455  
#> 10 478140 Sierra de Nei… National… DOM         1 open_f… 2016  1.49e1  0.000767 
#> # ℹ 12 more rows
#> # ℹ 1 more variable: geom <POLYGON [°]>
# }