The following treatment are performed:

  • all files for a given department are grouped (through a sf rbind)

  • only some common variables are kept

  • the projection is set to projection

  • the geometry is made valid

  • the output is saved at department level as rds in given destination

adapt.eaip(
  origin,
  destination,
  department,
  export = "rds",
  projection = 4326,
  variable_common = floodam.data::eaip_variable,
  validity = TRUE,
  retrieve = FALSE,
  verbose = FALSE
)

Arguments

origin

character, path to the directory where eaip are stored

destination

character, path to the directory where results should be saved

department

vector, departments to be adpated

export

character, option for export format of the results

projection

integer or object of type CRS giving projection

variable_common

character, what are the variables that should be kept. Best to leave it to default or NULL.

validity

logical, should st_make_valid be applied (may be very long).

retrieve

logical, should the result be returned

verbose

logical, should the function give some sumup informations.

Value

if retrieve = TRUE, sf object representing eaip for asked departments.

Author

Frédéric Grelot

Examples


if (FALSE) {
origin = "~/data/BD/EAIP/shp"
destination = tempdir()
eaip_01 = adapt.eaip(origin, destination, department = 1, verbose = TRUE, retrieve = TRUE)
}