Download orthophotos from the IGN WMS (RGB or IRC)
get_ortho.RdDownloads an orthophoto (RGB or infrared/IRC) from the IGN WMTS service for the
area covering x expanded with a buffer.
The result is returned as a masked SpatRaster, clipped to the input geometry
to keep file size minimal.
Usage
get_ortho(
x,
type = c("irc", "rgb"),
buffer = 200,
zoom = 12,
crs = 2154,
overwrite = FALSE,
verbose = TRUE
)Arguments
- x
sforsfc; Geometry located in France.- type
character; Type of orthophoto to download. Must be one of:"rgb"- true-color orthophoto"irc"- near-infrared orthophoto
- buffer
numeric; Buffer aroundx(in meters) used to enlarge the download area.- zoom
integerbetween 0 and 21. The smaller the zoom level, the less precise the resolution(seehappign::get_wmts())- crs
numericorcharacter; CRS of the returned raster (seehappign::get_wmts())- overwrite
logical; IfTRUE, file is overwritten.- verbose
logical; IfTRUE, display messages.
Details
The orthophoto retrieved contains data for the whole bounding
box (bbox) of x (plus the buffer).
To reduce the final file size and avoid unnecessary pixels, the raster is
immediately masked with the buffered geometry.