area_computation: Compute area statistics for region of interest on desired...

View source: R/area_computation.R

area_computationR Documentation

Compute area statistics for region of interest on desired polygon datasets

Description

Compute area statistics for region of interest on desired polygon datasets

Usage

area_computation(aoi = NULL, target_data = NULL, unit = "m")

Arguments

aoi

area of interest - polygon object (sf)

target_data

An sf object of which area is to be computed

unit

A character vector defining whether the result area should be in meter ("m") or kilometer ("km") - meter being default value

Value

A dataframe with areal statistics

Examples



# load wdpa polygon
pa <- sf::st_read(system.file("extdata", "test_wdpa.gpkg", package = "openRspat"))
# load test data
teow <- sf::st_read(system.file("extdata", "test_eoregions.gpkg", package = "openRspat"))
# define unit
unit <- "m"
# call function
area_computation(aoi=pa, target_data=teow, unit=unit)



Ohm-Np/openRspat documentation built on June 23, 2022, 3:03 p.m.