bomrang (version 0.7.0)

get_radar_imagery: Get BOM radar imagery

Description

Fetch BOM radar imagery from ftp://ftp.bom.gov.au/anon/gen/radar/ and return a raster layer object. Files available are the most recent radar snapshot which are updated approximately every 6 to 10 minutes. Suggested to check file availability first by using get_available_radar.

Usage

get_radar_imagery(product_id, path = NULL, download_only = FALSE)

Arguments

product_id

Character. BOM product ID to download and import as a raster object. Value is required.

path

Character. A character string with the name where the downloaded file is saved. If not provided, the default value NULL is used which saves the file in a temp directory.

download_only

Logical. Whether the radar image is loaded into the environment as a raster layer, or just downloaded.

Value

A raster layer based on the most recent `.gif' radar image snapshot published by the BOM. If download_only = TRUE there will be a `NULL` return value with the download path printed in the console as a message.

Details

Valid BOM Radar Product IDs for radar imagery can be obtained from get_available_radar.

References

Australian Bureau of Meteorology (BOM) radar images http://www.bom.gov.au/australia/radar/

See Also

get_available_radar

Examples

Run this code
# NOT RUN {
# Fetch most recent radar image for Wollongong 256km radar
library(raster)
imagery <- get_radar_imagery(product_id = "IDR032")
plot(imagery)

# Save imagery to a local path
imagery <- get_radar_imagery(product_id = "IDR032", path = "image.gif")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab