extract_building.Rd
The function'extract_building' extracts the layer 'batiment' from BD TOPO. First it uncompresses the archive '*.7z', typically comming from the use of download.bd_topo(). Then it extracts from 'gpkg file' the 'batiment', 'commune' and 'departement' layers as sf objects, applies scheme to all created sf objects. A selection of 'polygon' is made in 'batiment', to ensure that only those of current 'department' are kept, and the 'commune' to which they belong is added. The projection is set to 'projection'. If asked, the eaip information is added. If asked a map for checking purpose is saved. If asked the resulting sf object is returned (this is not default behaviour). Result is saved according to 'destination' path.
extract_building(
origin,
destination,
archive,
scheme = floodam.data::scheme_bd_topo_3,
journal = TRUE,
map = FALSE,
path_eaip = NULL,
projection = 4326,
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.
data.frame, how archive variables should be treated.
logical, should a journal file be saved.
logical, should a map be plotted (for check purpose).
character, path where eaip archives should be find.
numeric, 4 digits projection to use.
logical, should the result be returned.
logical, should the function give some sumup informations.
if retrieve = TRUE, data.frame of adapated data stored in archive.