[GRASS-dev] r.in.srtm doesn't validate zip file

Hi, I just tried to import a srtm tile in grass 6.2.2 (gentoo-gis
overlay ebuild), and it didn't validated my .hgt.zip files.

I checked in the script and it is checking against "file":

# really a ZIP file?
if [ "`file -ib $FILE.hgt.zip`" != "application/x-zip" ] ; then
  echo "$FILE.hgt.zip is no zip file."
  exit 1
fi

but in Gentoo box, I get this:

file S02W045.hgt.zip
S02W045.hgt.zip: Zip archive data, at least v2.0 to extract

I noticed that there was some discussion on this. Is is fixed in svn?
I have to recompile my svn version, the last one couldn't recognize
the dbf driver..

cheers

Carlos

--
+-----------------------------------------------------------+
Carlos Henrique Grohmann - Guano
Geologist M.Sc - Doctorate Student at IGc-USP - Brazil
Linux User #89721 - carlos dot grohmann at gmail dot com
+-----------------------------------------------------------+
_________________
"Good morning, doctors. I have taken the liberty of removing Windows
95 from my hard drive."
--The winning entry in a "What were HAL's first words" contest judged
by 2001: A SPACE ODYSSEY creator Arthur C. Clarke

Can't stop the signal.

Carlos wrote:

Hi, I just tried to import a srtm tile in grass 6.2.2 (gentoo-gis
overlay ebuild), and it didn't validated my .hgt.zip files.

I checked in the script and it is checking against "file":

# really a ZIP file?
if [ "`file -ib $FILE.hgt.zip`" != "application/x-zip" ] ; then
  echo "$FILE.hgt.zip is no zip file."
  exit 1
fi

but in Gentoo box, I get this:

file S02W045.hgt.zip
S02W045.hgt.zip: Zip archive data, at least v2.0 to extract

I noticed that there was some discussion on this. Is is fixed in svn?

Yes, it should be fixed in both SVN and newer 6.3.0rc versions. Now it
uses `unzip -t` instead of `file -ib` which was not portable.

possible workaround: unzip the file yourself, then point r.in.srtm to the
unzipped file.

Hamish

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ