[mkgmap-dev] "Small" SRTM1 files and DEM maps
From Carlos Dávila carlos at alternativaslibres.org on Fri Apr 17 09:32:24 BST 2020
I also searched for info about this format before posting to the list, but could not find anything either:-( El 17/4/20 a las 6:19, Gerd Petermann escribió: > Hi all, > > I could not find any information about this special format. Would be great if someone could point me to a detailed documentation. > > Gerd > > ________________________________________ > Von: Gerd Petermann <gpetermann_muenchen at hotmail.com> > Gesendet: Donnerstag, 16. April 2020 18:06 > An: Carlos Dávila > Betreff: AW: [mkgmap-dev] "Small" SRTM1 files and DEM maps > > Hi Carlos, > > the hgt files are very simple. They contain an array of n * n 16-bit values, nothing else. The 16-bit value gives the elevation, and the file name gives the position of the southwest corner, see https://stackoverflow.com/questions/357415/how-to-read-nasa-hgt-binary-files > Maybe the 12.4 MB files use 8-bit values for the elevation, but 12.970.802 / 3601 gives 3602, so there is probably an extra byte giving a delta value. > Coud not find a desription of this format so far. I'll try to find out more. > > Gerd > > ________________________________________ > Von: Carlos Dávila <carlos at alternativaslibres.org> > Gesendet: Donnerstag, 16. April 2020 17:39 > An: Gerd Petermann > Betreff: Re: [mkgmap-dev] "Small" SRTM1 files and DEM maps > > HI Gerd > I don't think conversion is wrong. If input geotiff file is 24MB, output > hgt file is 24 MB, if input tiff is 12MB, output hgt is 12MB > I use this command on Linux: > for i in *.tif ; do gdal_translate -strict -q -eco -of SRTMHGT $i > `basename $i tif`hgt ; done ; rm -f *.hgt.aux.xml > BTW, gdal is also able to deal with small SRTM files > > El 16/4/20 a las 11:31, Gerd Petermann escribió: >> Hi Carlos, >> >> so your conversion routine is wrong. The file size is 12.970.802 bytes. There is no integer n for which 2 * n^2 results in this value. >> >> Gerd >> >> ________________________________________ >> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <cdavilam at orangecorreo.es> >> Gesendet: Donnerstag, 16. April 2020 11:19 >> An: mkgmap-dev at lists.mkgmap.org.uk >> Betreff: Re: [mkgmap-dev] "Small" SRTM1 files and DEM maps >> >> Hi Gerd >> Forgot to mention files are downloaded as geotiff, but I then convert >> them to hgt, sorry. >> You can download a sample one from >> https://alternativaslibres.org/tmp/N50E118.hgt >> >> El 16/4/20 a las 9:18, Gerd Petermann escribió: >>> 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 <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <cdavilam at orangecorreo.es> >>> Gesendet: Montag, 13. April 2020 14:08 >>> An: mkgmap-dev at lists.mkgmap.org.uk >>> 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 <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <cdavilam at orangecorreo.es> >>>> 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 >>>> mkgmap-dev at lists.mkgmap.org.uk >>>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev >>>> _______________________________________________ >> _______________________________________________ >> mkgmap-dev mailing list >> mkgmap-dev at lists.mkgmap.org.uk >> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev >> _______________________________________________ >> mkgmap-dev mailing list >> mkgmap-dev at lists.mkgmap.org.uk >> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
- Previous message: [mkgmap-dev] "Small" SRTM1 files and DEM maps
- Next message: [mkgmap-dev] "Small" SRTM1 files and DEM maps
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list