getCwacSiteBoundary: Get a CWAC sites boundaries

View source: R/getCwacSiteBoundary.R

getCwacSiteBoundaryR Documentation

Get a CWAC sites boundaries

Description

This function retrieves the coordinate list for a set of CWAC sites and creates an simple feature polygon object.

Usage

getCwacSiteBoundary(
  loc_code = NULL,
  region_type = c("country", "province"),
  region
)

Arguments

loc_code

Optional (see details). A vector with the location code of the CWAC sites

region_type

The type of region we are interested in. Two options: "country" and "province".

region

A character string corresponding to the specific region we are interested in. It can be either a country in Southern Africa, or a South African province.

Details

A region_type and a region must be specified. This means that sites can only be retrieved from one province/country on a single call. However, multiple sites from the same province/country can be retrieved at once. If no loc_code is specified, then, all boundaries for all sites from the region are retrieved. Note that not all boundaries are available in the database. A warning message will be produced notifying about which sites are missing. At the moment, CWAC serves data from four countries: Angola, South Africa, Kenya and Tanzania. Only South African provinces are available: Western Cape, Eastern Cape, Northern Cape, Free State, Limpopo, Mpumalanga, KwaZulu-Natal, Gauteng, and Northwest Province.

Value

A simple feature polygon for the selected CWAC sites.

Examples

getCwacSiteBoundary(26352535, "country", "South Africa")
getCwacSiteBoundary("26352535", "country", "South Africa")

AfricaBirdData/CWAC documentation built on Aug. 5, 2024, 12:40 a.m.