adm_pointRadius.RdFind coordinates and uncertainty for administrative areas
adm_pointRadius(country, adm, cache_path=NULL, method="high_probability", geo=NULL)country name or country ISO code, or a SpatVector of polygons
positive integer to indicated admin level
path to pass the geodata::gadm to cache the gadm data. Use NULL to set a default path
character. "high_probability" or "low_uncertainty"
data.frame to compute the uncertainty based on pre-defined coordinates instead of adminstrative area centroids. The data.frame must have variables "longitude", "latitude" and "adm_" (replace underscore to match argument adm) with names that match the GADM admistrative area names. The locations should be inside the polygons with the matching names
data.frame
v <- terra::vect(system.file("ex/lux.shp", package="terra"))[, c("NAME_1", "NAME_2")]
a <- adm_pointRadius(v, method="high_probability")
#> Error in adm_pointRadius(v, method = "high_probability"): packageVersion("terra") >= "1.9.37" is not TRUE
dfput(a[1:3, ])
#> Error: object 'a' not found