regGeometry {arealDB} | R Documentation |
Register a new geometry entry
Description
This function registers a new geometry of territorial units into the geospatial database.
Usage
regGeometry(
...,
subset = NULL,
gSeries = NULL,
label = NULL,
layer = NULL,
archive = NULL,
archiveLink = NULL,
nextUpdate = NULL,
updateFrequency = NULL,
notes = NULL,
update = FALSE,
overwrite = FALSE
)
Arguments
... |
[ |
subset |
[ |
gSeries |
[ |
label |
[ |
layer |
[ |
archive |
[ |
archiveLink |
[ |
nextUpdate |
[ |
updateFrequency |
[ |
notes |
[ |
update |
[ |
overwrite |
[ |
Details
When processing geometries to which areal data shall be linked, carry out the following steps:
Determine the main territory (such as a nation, or any other polygon), a
subset
(if applicable), the dataseries of the geometry and the ontologylabel
, and provide them as arguments to this function.Run the function.
Export the shapefile with the following properties:
-
Format: GeoPackage
File name: What is provided as message by this function
CRS: EPSG:4326 - WGS 84
make sure that 'all fields are exported'
-
Confirm that you have saved the file.
Value
Returns a tibble of the entry that is appended to
'inv_geometries.csv' in case update = TRUE
.
See Also
Other register functions:
regDataseries()
,
regTable()
Examples
if(dev.interactive()){
# build the example database
makeExampleDB(until = "regDataseries", path = tempdir())
# The GADM dataset comes as *.7z archive
regGeometry(gSeries = "gadm",
label = list(al1 = "NAME_0"),
layer = "example_geom1",
archive = "example_geom.7z|example_geom1.gpkg",
archiveLink = "https://gadm.org/",
nextUpdate = "2019-10-01",
updateFrequency = "quarterly",
update = TRUE)
# The second administrative level in GADM contains names in the columns
# NAME_0 and NAME_1
regGeometry(gSeries = "gadm",
label = list(al1 = "NAME_0", al2 = "NAME_1"),
layer = "example_geom2",
archive = "example_geom.7z|example_geom2.gpkg",
archiveLink = "https://gadm.org/",
nextUpdate = "2019-10-01",
updateFrequency = "quarterly",
update = TRUE)
}