copernicus_wms2geotiff {CopernicusMarine} | R Documentation |
Extract and store WMS as a geo-referenced TIFF
Description
This function interacts with deprecated Copernicus Marine
Services. It will become .Defunct()
in future versions. Extract and store imagery from a
Copernicus WMS as a geo-referenced TIFF.
Usage
copernicus_wms2geotiff(
product,
layer,
variable,
region,
destination,
width,
height
)
Arguments
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
variable |
The name of a desired variable in a specific layer of a product (type |
region |
Specification of the bounding box as a |
destination |
File name for the geo-referenced TIFF. |
width |
Width in pixels of the TIFF image. |
height |
Height in pixels of the TIFF image. |
Details
A Web Map Service (WMS) cannot be plotted directly (base, ggplot2 and/or lattice). For that purpose you need to extract and download a specific region in a format that can be handled by plots. You can use this function to store a subset of a WMS map as a geo-referenced TIFF file.
Value
Stores the file as destination
and returns invisible NULL
Note
WMS functions don't work on systems that don't support GDAL utils
Author(s)
Pepijn de Vries
See Also
Other wms-functions:
addCopernicusWMSTiles()
,
copernicus_wms_details()
Examples
## Not run:
destination <- tempfile("wms", fileext = ".tiff")
copernicus_wms2geotiff(
product = "GLOBAL_ANALYSISFORECAST_PHY_001_024",
layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m",
variable = "thetao",
region = c(-1, 50, 7, 60),
destination = destination,
width = 1920,
height = 1080
)
## End(Not run)