HDF is a richer file format, and can do more than just store rasters. It
can contain multiple objects of different dimension.

There's a few ad-hoc standards for regular raster data in HDF though, where
objects in the HDF specify the coordinates on the axes - which might be
lat, lon, time, height  in a 4-D data set and then the 4d hypercube of data
itself.

See the Binary Data Formats section here:

 http://cran.r-project.org/doc/manuals/r-release/R-data.html

for some packages that can read HDF, but you might have to dig into the
metadata to work out how to get the NDVI raster for 01/2012 from your HDF
file. Without a sample, we're guessing...

Barry



On Tue, Mar 25, 2014 at 4:37 PM, dododave <dododave@gmail.com> wrote:

> Hi all,
>
> I am trying to load an hdf raster file consisting of NDVI values so that I
> can calculate the mean values within a polygon. I have been able to do this
> with GEOtiff files, but not with .hdf, which is strange because GIS
> programs
> can readily load them.
>
> I have looked into rgdal package, but that doesn't seem to have an hdf
> driver
>
> Thanks for any help,
> Dave
>
>
>
> --
> View this message in context:
> http://r-sig-geo.2731867.n2.nabble.com/reading-hdf-files-tp7586038.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

