[R-sig-Geo] How to open and work with an .hdf map
Matthew Landis
landis at isciences.com
Fri Jul 6 12:39:18 CEST 2012
Marc,
It's been a long time since I worked with HDF, so someone out there will
likely have better suggestions. But I think you will want to get that
out of HDF format as fast as possible. Try using hdp
(http://www.hdfgroup.org/hdp.html) to dump the file to a binary or ascii
file and then you should be able to read that in to R using readBin or
read.delim or such.
There are also hdf viewers at the HDFGroup site that should help you to
see what the file looks like, figure out the grid, etc.
M
On 7/6/2012 5:32 AM, Marc Marí Dell'Olmo wrote:
> Hello,
>
> I'm trying to open and work with a map I have downloaded from
> http://glovis.usgs.gov/, obtained from MODIS Terra satellite. This web
> only allows to download maps in .hdf format. I do not have ArcView, a GIS
> programme which opens these maps without any problem. I have been trying to
> do it using "R", however, I have not succeeded... First, I converted the map
> - which is in version 4 - to version 5 (with h4h5tools
> http://www.hdfgroup.org/h4toh5). I have tried to open it with satinGet
> (library satin) but I have obtained this error message:
> Error en queryname(nom.hdf5, what = "date") :
> objeto 'date.str' no encontrado
>
> Finally I managed to open the file using the function hdf5load (library
> hdf5). With this function I have obtained two objects "HDF4_DIMGROUP" ,
> "MOD44B_250m_GRID" but I don't know how can I represent spatially the data.
> I think I have a grid with the values of the variables but I don't know the
> reference of the coordinates (UTM long lat), the distance between the points
> of the grid, etc... In general, I don't know how to work with the
> information...
>
> I'm using Windows.
>
> Here is the link of the original map, in case it helps.
>
> http://dl.dropbox.com/u/22891835/MOD13Q1NDVI_2012Maig.hdf
>
> Thanks in advance for the help!
>
> Marc
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
~~~~~~~~~~~~~~~~~~~~~~~~~~
Matthew Landis, Ph.D.
Research Scientist
ISciences, LLC
61 Main St. Suite 200
Burlington VT 05401
802.864.2999
www.isciences.com
~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the R-sig-Geo
mailing list