regGeometry | R Documentation |
This function registers a new geometry of territorial units into the geospatial database.
regGeometry(
...,
subset = NULL,
gSeries = NULL,
label = NULL,
ancillary = NULL,
layer = NULL,
archive = NULL,
archiveLink = NULL,
downloadDate = NULL,
updateFrequency = NULL,
notes = NULL,
overwrite = FALSE
)
... |
|
subset |
|
gSeries |
|
label |
|
ancillary |
|
layer |
|
archive |
|
archiveLink |
|
downloadDate |
|
updateFrequency |
|
notes |
|
overwrite |
|
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 ontology label
,
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.
Returns a tibble of the entry that is appended to 'inv_geometries.csv'.
Other register functions:
regDataseries()
,
regTable()
if(dev.interactive()){
# build the example database
adb_exampleDB(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")
# 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"),
ancillary = list(name_lcl = "VARNAME_1", code = "GID_1", type = "TYPE_1"),
layer = "example_geom2",
archive = "example_geom.7z|example_geom2.gpkg",
archiveLink = "https://gadm.org/",
nextUpdate = "2019-10-01",
updateFrequency = "quarterly")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.