[R-sig-Geo] rgdal installation
Paul Hiemstra
p.hiemstra at geo.uu.nl
Mon Mar 17 20:41:20 CET 2008
Hi,
I had a similar problem with reading HDF5 files. The standard gdal
version compiled into rgdal probably does not support hdf4. One option
is to compile rgdal yourself using a gdal and proj version that support
hdf4. A good alternative is to translate the hdf4 file to tif (using
shell() to give the gdal_translate command through R) and then read it
into R.
cheers,
Paul
David PINAUD schreef:
> Dear all,
>
> I'm trying to import HDF (v4) files on R2.6.2 using the package rgdal
> and FWTools v2.1.0. I have the following message :
>
> > GDALinfo("T20060012006008.L3m_8D_SST_9.hdf")
> Erreur dans .local(.Object, ...) :
> GDAL Error 4: `T20060012006008.L3m_8D_SST_9.hdf' not recognised
> as a supported file format.
>
> I can load this file with FWTools without problem.
> I suppose that rgdal is not able to recognize the path to the
> FWTools/bin directory:
> > library(rgdal)
> Le chargement a nécessité le package : sp
> Geospatial Data Abstraction Library extensions to R successfully loaded
> Loaded GDAL runtime: GDAL 1.5.0, released 2007/12/18
> GDAL_DATA: C:/PROGRA~1/R/R-26~1.2/library/rgdal/gdal ####### it
> should be FWTools/bin ?? #####
> Loaded PROJ.4 runtime: Rel. 4.6.0, 21 Dec 2007
> PROJ_LIB: C:/PROGRA~1/R/R-26~1.2/library/rgdal/proj
>
> However I set before the PATH environment variable in Windows
> (Start>Parameters>Configuration Panel>System>Advanced>Environment
> variables : GDAL_DATA set to C:\Program Files\FWTools2.1.0\bin) as
> explained in http://rgdal.sourceforge.net/. No effect.
>
> What's wrong ? Is there a thing that I've missed or didn't do
> correctly? Is there another way to set this directory?
>
> Thank you for your help^.
>
> David
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone: +31302535773
Fax: +31302531145
http://intamap.geo.uu.nl/~paul
More information about the R-sig-Geo
mailing list