Closed mibe closed 2 months ago
The source parameter does support the file scheme for local files, but it still needs the directory structure of the original SRTM server with the continents. So just throwing a bunch of .hgt files in a directory will not work.
You always can throw a bunch of .hgt
files into the cache directory (folder SrtmCache in the cache folder specified with -d).
The files in the source directory must be .hgt.zip
files, not .hgt
.
If all required files are found in the cache, the source must not be known.
An additional parameter to ignore the Region
structure could be implemented to make the source parameter more comfortable.
But another option to use specific file extensions should be added too.
.hgt.zip
is not the only extension used by different sources (but the name part is always [N|S]??[W|E]???
)
some use .zip
(sonny) or the srtm1 files by nasa have .SRTMGL1.hgt.zip
That region enum is there because that was used in the directory structure on the original NASA server. Today the program could just index the server once and remember under which URL which files are available.
Heck, if the license question would be clear I would even host the hgt.zip files on my server wihtout any special structure.
Even the filename could be made variable, if the user could supply a template or regex. And in the last resort the program could also ask the user to select the file for the needed cell manually.
That region enum is there because that was used in the directory structure on the original NASA server. Today the program could just index the server once and remember under which URL which files are available.
The current default source (http://firmware.ardupilot.org/SRTM/) works with those regions.
The source parameter does support the file scheme for local files, but it still needs the directory structure of the original SRTM server with the continents. So just throwing a bunch of .hgt files in a directory will not work.
This should be changed so that "throwing a bunch of .hgt files" will work. This is much easier for DEMs that are in SRTM format but not necessarily from the SRTM server, like in #13.