copernicus_wms2geotiff {CopernicusMarine}R Documentation

Extract and store WMS as a geo-referenced TIFF

Description

[Deprecated] 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 character) of the desired Copernicus marine product. Can be obtained with copernicus_products_list.

layer

The name of a desired layer within a product (type character). Can be obtained with copernicus_product_details.

variable

The name of a desired variable in a specific layer of a product (type character). Can be obtained with copernicus_product_details.

region

Specification of the bounding box as a vector of numerics WGS84 lat and lon coordinates. Should be in the order of: xmin, ymin, xmax, ymax.

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)

[Package CopernicusMarine version 0.2.3 Index]