[GRASS-user] Importing DEM - r.in.srtm: unzip required, please install first

Hamish hamish_nospam at yahoo.com
Thu May 3 01:32:31 EDT 2007

Jarle Pedersen wrote:
> >> > Running GRASS 6.2 through Cygwin on Windows XP, I'm trying to
> >> > importa DEM saved in SRTM-format (.hgt) which I got from
> >> > http://www.viewfinderpanoramas.org/dem3.html
> >> >
> >> > Both in the command-line and GUI versions I get this rather
> >> >curious error: r.in.srtm: unzip required, please install first
> > Hernán De Angelis wrote:
> >> It means that r.in.srtm cannot find the unzip program to decompress
> >> the file.
> > I have just added "unzip" to list of suggested Cygwin packages on
> > the download page.
> >
> > r.in.srtm expects the .hgt file to be zipped (WinZip, etc). It
> > should be named like "S46E166.hgt.zip".
> I installed the unzip-package via Cygwin, and now I get the following 
> error which seems to be related to your last comment:
> "/usr/local/grass-6.2.1/scripts/r.in.srtm: line 135: file: command not
> found
> /home/Anonymized/Helgeland/dem/N65E012.hgt.zip is no zip file."

"file" is another common UNIX tool for testing file types, which
apparently cygwin doesn't include by default. Install the cygwin "file"
package. You'll also need "grep" -- is that package already installed?
How about "install"? (try: "which grep" and "which install")

> Problem is I did zip the file, but did so via Winzip. Might this have 
> something to do with it?

No, that should be fine; it's the missing "file" program that makes the
file type test fail.

I have just updated r.in.srtm in 6.3cvs to work even if the file is
already unzipped. The new version is currently not backwards compatible
with GRASS 6.2 due to grass bug #381.

> Thanks again for any help, and terribly sorry to occupy this mail-list
> with such trivial questions.

They are useful. By pointing out deficiencies in the documentation, we
can know to fix them, then the next person doesn't have the same
troubles, and thus the software gets a little bit better.


More information about the grass-user mailing list