Thanks for making that crystal clear.
For the moment, I will probably stick to FWtools to make my conversions, but
I hope I will have time to learn how to build gdal from source including the
drivers I need.

Thanks again,

Arnaud

2011/9/4 Roger Bivand <Roger.Bivand@nhh.no>

> On Sat, 3 Sep 2011, Arnaud Mosnier wrote:
>
>  Hi Jan,
>>
>> Thanks for you answer.
>> I tried your script but unfortunatly it does not work for my case.
>>
>
> No, you did not. He is using rgdal built against an OSX framework GDAL that
> includes an HDF driver. If you type gdalDrivers() on your CRAN rgdal built
> statically against a minimal GDAL, you will see that you do not have an HDF
> driver. You need either to install rgdal from source linked to a GDAL that
> has the HDF driver (which I assume you do not want to do - see
> file.show(system.file("README.**windows", package="rgdal")) for details if
> you do), or to use external software, such as a Windows version of
> gdal_translate to convert your HDF file to for example GTiff outside R, and
> then use the minimal set of drivers included in the CRAN rgdal to read the
> data.
>
> GDAL potentially has well over 100 drivers, many of which must be linked
> against external libraries. It is not practically possible to build the CRAN
> Windows rgdal binaries (or the CRAN Extras OSX rgdal binaries) for more than
> a minimal set with very few external dependencies. A source of Windows GDAL
> binaries is:
>
> http://www.gisinternals.com/**sdk/ <http://www.gisinternals.com/sdk/>
>
> linked from:
>
> http://trac.osgeo.org/gdal/**wiki/DownloadingGdalBinaries<http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries>
>
> from:
>
> http://www.gdal.org/
>
> Hope this helps,
>
> Roger
>
>  If someone want to make some test with the kind of image I want to use,
>> just
>> try this script to download and uncompress it.
>>
>> TestFolder <- choose.dir()
>>
>> download.file("
>> http://oceandata.sci.gsfc.**nasa.gov/cgi/getfile/**
>> A20072132007243.L3m_MO_CHL_**chlor_a_4km.bz2<http://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A20072132007243.L3m_MO_CHL_chlor_a_4km.bz2>
>> ",
>> f<-paste(TestlFolder, "/hdf4test.bz2", sep = "")
>> library(R.utils)
>> gunzip(f, f2<-paste(TestFolder, "/testhdf4.hdf", sep = "")
>> GDALinfo(f2) # in my case it results on this message
>> `C:/test/testhdf4.hdf' not recognised as a supported file format.
>>
>>
>>
>> Here is my sessionInfo() result.
>>
>> R version 2.12.0 (2010-10-15)
>> Platform: x86_64-pc-mingw32/x64 (64-bit)
>>
>> locale:
>> [1] LC_COLLATE=French_Canada.1252  LC_CTYPE=French_Canada.1252
>> LC_MONETARY=French_Canada.1252 LC_NUMERIC=C
>> LC_TIME=French_Canada.1252
>>
>> attached base packages:
>> [1] grDevices datasets  splines   graphics  stats     tcltk     utils
>> methods   base
>>
>> other attached packages:
>> [1] R.utils_1.7.8     R.oo_1.8.1        R.methodsS3_1.2.1 rgdal_0.7-1
>> raster_1.9-5      sp_0.9-84         svSocket_0.9-51   TinnR_1.0.3
>> R2HTML_2.2        Hmisc_3.8-3       survival_2.35-8
>>
>> loaded via a namespace (and not attached):
>> [1] cluster_1.14.0  grid_2.12.0     lattice_0.19-33 svMisc_0.9-61
>> tools_2.12.0
>>
>>
>> Thanks for any help !
>>
>> Arnaud
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________**_________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/**listinfo/r-sig-geo<https://stat.ethz.ch/mailman/listinfo/r-sig-geo>
>>
>>
> --
> Roger Bivand
> Department of Economics, NHH Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand@nhh.no
>
>

	[[alternative HTML version deleted]]

