View source: R/Get_Ocean_Prod.R
Get_Ocean_Prod | R Documentation |
Download SeaWiFS or MODIS HDF4 file from Ocean Productivity Web page and then convert to a raster object
Get_Ocean_Prod(url, outdir = NULL)
url |
A character string naming the URL of a HDF4 file to be downloaded |
outdir |
output directory to write raster file |
x |
Raster* object defining the spatial extent, resolution and projection of climatology data to be retrived. If not provide, returning full data set. |
plot |
Logical, whether or not to plot the output raster |
This function dowloads HDF4 file from Ocean Productivity Web page http://www.science.oregonstate.edu/ocean.productivity/
This is an R wrapper for the gdal_translate
function that is part of the Geospatial Data Abstraction Library (GDAL), which assumes the
user has a working GDAL on their system. However, if the GDAL not working, Get_Ocean_Prod2
can be used as alternative.
a raster object
Chih-Lin Wei <chihlinwei@gmail.com>
http://www.gdal.org/gdal_translate.html
# Download August 2002 VGPM as example
url <- "http://orca.science.oregonstate.edu/data/2x4/monthly/vgpm.r2018.m.chl.m.sst/hdf/vgpm.2002182.hdf.gz"
Get_Ocean_Prod(url)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.