hyat
hyat

Reputation: 1057

How to read HDF format in R?

I want to work with some data that has the format of hdf. I downloaded the file from here: I tried to open/read the file using different commands but I got errors: 1

h5ls(")

  2  

library(rgdal)

Gdalinfo("")

 Error: could not find function "Gdalinfo"
 > GDALinfo("")
  Error in .local(.Object, ...) : 
 `' not recognised as a supported file format.

3

            > GDALinfo("" ,returnCategoryNames=FALSE)

             Error in .local(.Object, ...) : 
     `' not recognised as a supported file format.

        > a=readGDAL("")

        Error in .local(.Object, ...) : 
      `' not recognised as a supported file format.

3

a=readGDAL("file.hdf")

       Error in .local(.Object, ...) : 
      `file.hdf' not recognised as a supported file format.

4

GDALinfo(fname="file.hdf")

       Error in .local(.Object, ...) : 
     `f' does not exist in the file system,

and is not recognised as a supported dataset name. 5

      > GDALinfo(fname="file.hdf")

   Error in .local(.Object, ...) : 
      `file.hdf' not recognised as a supported file format.

I appreciate any-help and the file is can be downloaded thru the link I provided.Thanks

Upvotes: 1

Views: 2533

Answers (1)

Ümit
Ümit

Reputation: 17489

Which HDF library for R are using?
The files you try to open are HDF4 files and not HDF5.
You can use HDF5View to open the files.

Upvotes: 4

Related Questions