Adapt Admin Express archives
adapt_admin_express.Rd
adapt_admin_express()
treats Admin Express archives to be in a standard
format. It is suited for IGN archives. It used by default
scheme_admin_express_3_1`` as scheme. For older versions
scheme_admin_express_2_0` is also available.
Beware that adapt_admin_express()
will perform all possibles combinations
of archives present in origin and layers available in scheme if those
parameters are not specified.
Usage
adapt_admin_express(
origin,
destination,
archive,
layer = NULL,
scheme = floodam.data::scheme_admin_express_3_1,
projection = 4326,
extension = "rds",
journal = TRUE,
retrieve = FALSE,
verbose = TRUE
)
Arguments
- origin
character, path to the directory where archive are stored.
- destination
character, path to the directory where results should be saved.
- archive
character, vector of archive to be adpated.
- layer
character, which layer should be treated.
- scheme
data.frame, how archive variables should be treated.
- projection
integer or object of type CRS giving projection.
- extension
character, option for extension and so format of saving of results.
- journal
logical, should a journal file be saved.
- retrieve
logical, should the result be returned.
- verbose
logical, should the function give some sumup informations.
Value
if retrieve = TRUE, sf object of adapated data stored in archive. This may be a list if the function implies recursive calls.
Details
The following treatment are performed:
depending on how many archives and layers are to be treated, a recursive call may be perform to do all desired combinations.
archive is read with
read_with_scheme()
, which may imply that it is uncompressed, then read (usually as a shp or a gpkg file), reprojected if asked, and finally adapted.the output is saved as rds in given destination withe
save_archive()
. The name of archive include a precision depending on the layer chosen. For layer 'COMMUNE', the saving is made by departments.