[GRASSLIST:5591] Re: r.in.hdf

Kenlo Nishida nishida at bres.tsukuba.ac.jp
Tue Feb 18 06:54:14 EST 2003


Dear Dr. Neteler, Bartholdy, and GRASS users:

Thank you for giving me advices on r.in.hdf. Following Dr. Neteler's suggestion,
I tried r.in.gdal instead of r.in.hdf. 

First, I downloaded the latest GDAL package from
ftp://ftp.remotesensing.org/pub/gdal/openev/openev_FW_linux_1.5.4.tar.gz
and installed it to /usr/local/open_FW/. Then I compiled grass5.0.1 with
  $ ./configure --with-gdal=/usr/local/openev_FW/ --without-odbc --without-fftw --without-postgres
  $ make
  # make install
But r.in.gdal returned an error message when I run it. Then I added a path to the GDAL library:
  GRASS> export LD_LIBRARY_PATH=/usr/local/grass5/lib:/usr/local/openev_FW/lib
This was the key. Then I successfully imported SPOT-Vegetation HDF data with r.in.gdal.
It's really nice.

But I do not see why GRASS did not set LD_LIBRARY_PATH automatically for GDAL.
Anyway, I added this export command to /usr/local/bin/grass5, hence I do not have to care
about it any more. But if anybody know why this happened, I would like to ask.

As for MODIS, I know MODIS-Reprojection-Tool (MRT) is the best choice for such a 
beginner like me, but as far as I tried, MRT runs only under GUI of Java. I wondered whether 
there might have been another choice which can provide batch (script) processing for lots of 
MODIS HDF files at one time. 

Kenlo Nishida



----- Original Message ----- 
From: "Markus Neteler" <neteler at itc.it>
To: <nishida at bres.tsukuba.ac.jp>
Cc: <grasslist at baylor.edu>
Sent: Monday, February 17, 2003 10:38 PM
Subject: [GRASSLIST:5583] Re: r.in.hdf


> On Sun, Feb 16, 2003 at 03:45:27PM +0900, nishida at bres.tsukuba.ac.jp wrote:
> > Dear GRASS users:
> > 
> > I would like to ask your help.
> > I have troubles using r.in.hdf in GRASS5.0.1 and GRASS4.3
> > on Linux on my intel-PC.
> > 
> > On GRASS5.0.1 I found r.in.hdf had not been installed,
> > hence I tried to install it by myself by running "# gmake5"
> > under ~/grass5.0.1/src.garden/grass.hdf/ but I came up with
> > some error messages like this:
> > 
> >   No rule to make target "-lgis" which is necessary for
> >   ~/grass5.0.1/dist.i686-pc-linux-gnu/etc/bin/cmd/r.in.hdf.
> >   Stopped.
> > 
> > (To tell the truth, this may not be very accurate because I
> > translated it from the original error message in Japanese
> > in my Linux system).
> 
> Yes, the r.in.hdf is not compiled as it is not yet completely
> updated. It works more or less, but I have no time to finish it.
> 
> The recommendation is to use r.in.gdal instead. GDAL supports
> HDF from the current official release onwards.
> 
> > On GRASS4.3, I downloaded a precompiled binary and found that
> > r.in.hdf was one of default commands already compiled in the
> > binary. I tried to use it for two HDF files: a SPOT-Vegetation 
> > radiometric data as well as MODIS data (MOD02QKM), but in both
> > case, I came up with messages as follows and obtained no data in
> > raster data lists at g.list.
> 
> The old r.in.hdf from GRASS4.3 is unable to read recent HDF files.
>  
> >   Large file - reading row by row.
> >   Writing GRASS output file: hdf.rast01
> >   WARNING: G_set_window(): Illegal latitude for North
> > 
> > I know the HDF format of MODIS is not pure HDF but HDF-EOS and
> > I guessed this "dialect" in HDF might caused this problem, but
> > I do not know any possible problems with SPOT-Vegetation.
> 
> To process MODIS data with GRASS, you may consider to use the
> MODIS reprojection tool instead of r.in.gdal as you have to
> transform the ISIN projected MODIS data to something useful.
> ISIN is not supported (yet) by GRASS/PROJ4 or most other GIS
> systems.
> 
> To process MODIS data with GRASS, see for example:
>  http://mpa.itc.it/rs/
> (links to MRT etc. are on that page)
> 
> Kind regards
> 
>  Markus Neteler
>




More information about the grass-user mailing list