我有大量.hdf格式的文件。遗憾的是,我所知道的hdf5文件在R中是不可读的。有没有办法在R中加载和读取hdf文件?或者有没有办法将.hdf转换为hdf5?我下载了基于C的h4toh5工具,但没用。还有其他转换方式吗?非常感谢。
答案 0 :(得分:0)
我不会将hdf4描述为传统格式@mdsummer。 NASA仍然在hdf4中提供了大量数据。
这类似于人们(包括我自己)不确定他们的.hdf文件是hdf4还是hdf5的一些帖子。您可以使用名为HDFView的程序,该程序可以免费下载,并且非常容易使用,以确定您是否有hdf4 / 5文件。只需加载文件并查看“属性”。
如果你有hdf4文件,那么你应该从Under the currently selected Interface preference, find the heading that says Playlist and Instances.
Make sure that Allow only one instance checkbox is not checked.
包中查看gdal_translate
。这里有更多信息,包括我用于hdf文件的代码:
Reading hdf files into R and converting them to geoTIFF rasters
答案 1 :(得分:0)