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 codeadapt_admin_express will perform all possibles combinations of archives present in origin and layers available in scheme if those parameters are not specified.
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 )
character, path to the directory where archive are stored.
character, path to the directory where results should be saved.
character, vector of archive to be adpated.
character, which layer should be treated.
data.frame, how archive variables should be treated.
integer or object of type CRS giving projection.
character, option for extension and so format of saving of results.
logical, should a journal file be saved.
logical, should the result be returned.
logical, should the function give some sumup informations.
if retrieve = TRUE, sf object of adapated data stored in archive. This may be a list if the function implies recursive calls.
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
name of archive include a precision depending on the layer chosen. For layer
'COMMUNE', the saving is made by departments.