Download an RGB raster layer from IGN Web Map Tile Services (WMTS). WMTS focuses on performance and can only query pre-calculated tiles.
Usage
get_wmts(x,
apikey = "ortho",
layer = "ORTHOIMAGERY.ORTHOPHOTOS",
zoom = 10L,
crs = 2154,
filename = tempfile(fileext = ".tif"),
overwrite = FALSE,
interactive = FALSE)
Arguments
- x
Object of class
sf
orsfc
. Needs to be located in France.- apikey
character
; API key fromget_apikeys()
or directly from IGN website.- layer
character
; layer name fromget_layers_metadata(apikey, "wms")
or directly from IGN website.- zoom
integer
between 0 and 21; at low zoom levels, a small set of map tiles covers a large geographical area. In other words, the smaller the zoom level, the less precise the resolution. For conversion between zoom level and resolution see WMTS IGN Documentation- crs
numeric
,character
, or object of classsf
orsfc
. It is set to EPSG:2154 by default. Seesf::st_crs()
for more detail.- filename
character
orNULL
; filename or a open connection for writing. (ex : "test.tif" or "~/test.tif"). IfNULL
,layer
is used as filename. Default drivers is ".tif" but all gdal drivers are supported, see details for more info.- overwrite
If TRUE, output raster is overwrite.
- interactive
logical
; If TRUE, interactive menu ask forapikey
andlayer
.