This function downloads protected areas for one country using the WDPA API.
get_wdpa(isocode, path = "wdpa", key = "WDPA_KEY")
isocode | a character specifying the ISO-3 code of the country |
---|---|
path | the path (directory) to save spatial dataset ( |
key | a character providing the WDPA token name stored in the
|
A sf
object (GEOMETRY) of protected areas defined in the
EPSG 4326 with the following 19 attributes:
the ID of the protected area on the WDPA database
the name of the protected area on the WDPA database
the original name of the protected area
the ISO-3 code of the country
the name of the country
the owner of the protected area
a boolean: TRUE
for marine and FALSE
for terrestrial
protected area
the designation of the protected area
the IUCN category
the no take status
the (reported) area of the protected area
the (reported) area of the marine part of the protected area
the (reported) area of the no take part of the protected area
the legal status of the protected area
the management authority
the type of gouvernance
the URL of the management plan
the URL of the protected area page on the Protected Planet website
the date of the last update of the legal status
Spatial data are also written on the hard drive in the folder path
as a
geopackage. Filename is structured as XXX_protectedareas.gpkg (where
XXX
is the ISO-3 code of the country). If the path
folder does not exist
it will created relatively to the current directory.
Note that some geometries are POINTS not (MULTIPOLYGONS).
wdpa_countries
, get_countries
if (FALSE) { ## Get the ISO-3 code of Georgia ---- data("wdpa_countries", package = "worldpa") wdpa_countries[grep("Georgia", wdpa_countries$"country_name"), 3:4] ## country_name country_iso3 ## 133 Georgia GEO ## 235 South Georgia and the South Sandwich Islands SGS ## Download Protected Areas for Georgia ---- worldpa::get_wdpa(isocode = "GEO", path = file.path("data", "wdpa")) }