Function used to downlaod BD TOPO

download.bd_topo(
  destination,
  origin = "IGN",
  name = NULL,
  extension = NULL,
  date = NULL,
  version = NULL,
  theme = "TOUSTHEMES",
  department = NULL,
  region = NULL,
  verbose = TRUE
)

Arguments

destination

character, the address where dara are stocked.

origin

character, either a keyword or the address from where data are downloaded. See details.

name

character, vector of acceptable names fo archive to be downloaded.

extension

character, vector of acceptable types of archive to be downloaded.

date

character, date of the archive to be downloaded.

version

string, version of ADMIN EXPRESS to be downloaded.

theme

character, themes of BD TOPO to be downloaded when origin is "IGN". See details.

department

integer, or converted to integer. Departments that should be considered. See details.

region

integer, or converted to integer. Regions that should be considered. See details.

verbose

logical, should the function send some messages while running.

Value

nothing

Details

If origin == "IGN", then all necessary variables are filled with those values:

  • origin is changed to ftp://Admin_Express_ext:Dahnoh0eigheeFok@ftp3.ign.fr

  • name default value is changed to "BDTOPO_3-0"

  • extension default value is changed to "7z.001"

  • date default value is used to choose a given directory. If date is null, then the most recent version is taken (equivalent to "last")

  • version must be something within "SHP" or "SQL"

  • theme is used. It must be somthing within "ADMINISTRATIF", "ADRESSES", "BDADRESSE", "ERP", "HYDROGRAPHIE", or "TOUSTHEMES". This last value deing default.

  • department is used. Should be admissible French departments.

  • region is used. Should be admissible French regions.

If not, everything shall be filled so that download_archive can make a successful download.

Examples

if (FALSE) {
destination = tempdir()
download.bd_topo(destination)
download.bd_topo(destination, department = 34)
download.bd_topo(destination, department = 34, date = "2019-09-19")
download.bd_topo(destination, region = 11)
download.bd_topo(destination, department = 34, theme = "ADRESSES")
download.bd_topo(destination, department = 34, theme = "BDADRESSE")

unlink(destination)
}