View source: R/getCwacSiteBoundary.R
getCwacSiteBoundary | R Documentation |
This function retrieves the coordinate list for a set of CWAC sites and creates an simple feature polygon object.
getCwacSiteBoundary(
loc_code = NULL,
region_type = c("country", "province"),
region
)
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. |
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.
A simple feature polygon for the selected CWAC sites.
getCwacSiteBoundary(26352535, "country", "South Africa")
getCwacSiteBoundary("26352535", "country", "South Africa")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.