Function used to download RPG

download.rpg(
  destination,
  origin = "cquest",
  name = NULL,
  extension = NULL,
  version = NULL,
  date = NULL,
  year = 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.

version

string, version of archive to be downloaded.

date

character, date of the archive to be downloaded.

year

integer or character, vector of year to be downloaded.

verbose

logical, should the function send some messages while running.

Value

nothing

Details

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

  • origin is changed to https://data.cquest.org/registre_parcellaire_graphique. This url is adapted depending on year.

  • extension default value is changed to c("zip", "7z").

  • year is used to set something equivalent to date, but directly in origin.

  • date is set to null, because conflict may occur with year.

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

  • origin is changed to ftp://RPG_ext:quoojaicaiqu6ahD@ftp3.ign.fr. This url is adapted depending on year.

  • name default value is set to "RPG".

  • extension default value is changed to c("7z", "7z.001").

  • year may be used to set something equivalent to date, but directly in origin. This should be only used for year 2010 and 2011. It is not used if year is something else.

  • date default value is set to "last". It is set to NULL if year is successfully used.

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

Examples


if (FALSE) download.rpg(tempfile(), year = "2010")