Learn R Programming

frheritage (version 0.1.0)

zip_query_build: Build a URL query to download a ZIP

Description

Constructs a URL query to request a ZIP file containing spatial data from the French Ministry of Culture's "Atlas du Patrimoine" service.

Usage

zip_query_build(id, title, guid = NULL, extent_vals, crs = 2154)

Value

character. URL string for downloading the dataset in ZIP format.

Arguments

id

character or numeric. Identifier of the dataset.

title

character. Title of the dataset.

guid

character, optional. GUID of the dataset, if available.

extent_vals

numeric vector of length 4. Bounding box coordinates in order: left, bottom, right, top.

crs

numeric, default 2154. CRS code for the coordinate reference system to use in the query.

Details

  • The function formats the bounding box and metadata into a JSON object, then encodes it into a URL suitable for the Atlas Patrimoines export service.

  • CRS is converted to a string "EPSG:<code>".