That seems to be bash on linux. Perhaps, this will help. The double quotes are to handle file names with spaces and the like in them.

$ for tiffile in *.til; do echo gdal_translate -of SRTMHGT "$tiffile" `basename "$tiffile" .til`.hgt; done
gdal_translate -of SRTMHGT xyz.til xyz.hgt
$ ls
xyz.til

Randolph J. Herber

On 4/16/2020 3:54 AM, Steph wrote:
Hi,

Uggly scripts I use…

- tif2hgt.sh:
for tiffile in *.tif;do
 gdal_translate -of SRTMHGT $tiffile $tiffile.hgt;
done

- tif_dim.sh (if .tif downloaded by phyghtmap are "too" small…)
 for tiffile in *.tif;do
     gdalwarp -of GTiff -srcnodata 32767 -rcs -order 3 -ts 1201 1201 -multi $tiffile $tiffile.TIF;
 done

Renaming is not integrated within the scripts… 🙁 (removing first extension)
Perhaps the second can help… 🙄

On Linux !

@+
Steph

Le 16/04/2020 à 10:18, Gerd Petermann a écrit :
Hi Carlos,

are you talking about geotiff format? I think someone documented how that format can be converted to *.hgt.
Can you post a link to such a file?

Gerd



________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Carlos Dávila <[email protected]>
Gesendet: Montag, 13. April 2020 14:08
An: [email protected]
Betreff: Re: [mkgmap-dev] "Small" SRTM1 files and DEM maps

Hi Gerd
They are downloaded by phyghtmap. This is what I found digging into
phyghtmap files:
|def getSRTMFileServer(self, resolution, srtmVersion):||
||        if srtmVersion == 2.1:||
||            return
"https://dds.cr.usgs.gov/srtm/version2_1/SRTM{0:d}".format(resolution)||
||        elif srtmVersion == 3.0:||
||            if resolution == 1:||
||                urlRe =
"https://earthexplorer.usgs.gov/download/8360/SRTM1{:s}V3/GEOTIFF/EE";||
||            elif resolution == 3:||
||                urlRe =
"https://earthexplorer.usgs.gov/download/4960/SRTM3{:s}V2/GEOTIFF3/EE";||
||            return urlRe|
They should come from the second URL above.

El 13/4/20 a las 8:24, Gerd Petermann escribió:
Hi Carlos,

sorry for the late response. I found no hint on the phyghtmap page http://katze.tfiu.de/projects/phyghtmap/ regarding a new format for srtm data. The hgt format is not compressed. Do you know from where these 12.4 MB files came from?

Gerd

________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Carlos Dávila <[email protected]>
Gesendet: Samstag, 11. April 2020 17:09
An: Development list for mkgmap
Betreff: [mkgmap-dev] "Small" SRTM1 files and DEM maps

I use phyghtmap to build contour lines and also to download hgt data
that I then use to build DEM maps with mkgmap. For a long time, SRTM1
files (and also VFP1) have all been ~24.7 MB in size, but lately (I
don't remember since when) SRTM1 are also served as 12.4 MB files.
phyghtmap is able to generate contour lines from those small files, as
they seem to contain the same information but with a different
compression ratio, but mkgmap fails to read them, and report them as
missing. Would it be possible to get support for such files in mkgmap?
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to