I am trying to download and plot the modis data from here http://orca.science.oregonstate.edu/1080.by.2160.monthly.hdf.vgpm.s.chl.a.sst.php
I regularly use .nc files from the ocean colour website but I can't seem to work with the hdf files the same way. It is possible to convert the hdf to a raster?
gdalinfo("~vgpm.2008245.hdf")
gdal_translate(sds, dst_dataset = "~test.tiff")
sh: -c: line 0: unexpected EOF while looking for matching ``'
sh: -c: line 1: syntax error: unexpected end of file
NULL
rast <- raster("~test.tiff")
Error in .local(.Object, ...) :
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
Cannot create a RasterLayer object from this file. (file does not exist)
I have tried the advice here Reading hdf files into R and converting them to geoTIFF rasters
and received this error: sh: -c: line 0: unexpected EOF while looking for matching ``' sh: -c: line 1: syntax error: unexpected end of file
I have also tried the suggestion here Converting HDF to georeferenced file (geotiff, shapefile) and the error is: Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", : Cannot create a RasterLayer object from this file.
I just want to extract the data and plot the productivity data for a given location over time in a line plot alongside other data that I have...
thank you