[英]Reading hdf4 files in R
I have some hdf4 files which I want to read in R. 我有一些要在R中读取的hdf4文件。
I came across this answer to use gdalUtils
package. 我碰上了这个答案使用
gdalUtils
包。 But the following code gives me a warning and it doesn't work. 但是下面的代码给了我一个警告,它不起作用。
gdalinfo(file.path)
NULL
Warning messages:
1: In gdal_setInstallation(ignore.full_scan = ignore.full_scan, verbose = verbose) :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)
2: In gdal_setInstallation(ignore.full_scan = ignore.full_scan, verbose = verbose) :
If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
This suggestion also didn't work gdal_setInstallation(ignore.full_scan=FALSE)
这个建议也不起作用
gdal_setInstallation(ignore.full_scan=FALSE)
Do you know of any other package or way to read HDF4 files in R? 您是否知道其他任何用R读取HDF4文件的软件包或方式?
For Mac users : I had the same issue. 对于Mac用户 :我有同样的问题。 I followed the instructions here .
我按照这里的指示进行。
Which consisted of downloading the most recent GDAL framework from here . 其中包括从此处下载最新的GDAL框架。
and then running the command: 然后运行命令:
echo 'export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH' >> ~/.bash_profile
source ~/.bash_profile
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.