If I remember correctly, MODIS images are in HDF4 format and if you are in
a windows environment gdal is not compiled with the hdf4 driver.
As already suggested, you can use FWTools to convert them in geotiff (for
example).
You can call gdal_translate implemented in it (this version of gdal is
compiled with the hdf4 driver) by using the following line directly in R

system(paste('"C:/PROGRA~2/FWTOOL~1.7/bin/gdal_translate"', filename,
paste(filename, ".tif", sep="")), ignore.stderr = TRUE)

with the object filename containing the name of the MODIS file

Arnaud

Date: Wed, 11 Apr 2012 07:57:28 +0000
From: Paul Hiemstra <paul.hiemstra@knmi.nl>
To: julio cesar oliveira <oliveirajc@ufv.br>
Cc: r-sig-geo@r-project.org
Subject: Re: [R-sig-Geo] read MODIS image in HDF format
Message-ID: <4F853968.2000601@knmi.nl>
Content-Type: text/plain; charset="ISO-8859-1"

On 04/10/2012 12:42 PM, julio cesar oliveira wrote:
> Is possible to read MODIS images in HDF format in R?
> Example : MOD13Q1.A2001065.h13v12.005.
2007007110531.hdf
>
> Thansk
>
> Julio
>
>       [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

You can use rgdal with the hdf5 driver installed.

good luck,
Paul

--
Paul Hiemstra, Ph.D.
Global Climate Division
Royal Netherlands Meteorological Institute (KNMI)
Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
P.O. Box 201 | 3730 AE | De Bilt
tel: +31 30 2206 494

http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770

	[[alternative HTML version deleted]]

