Empty/invalid SRTM 3 sec files being downloaded when the difference between bounds' latitude and 64 is less than 5
Closed this issue · 0 comments
Achaad commented
I need to acquire SRTM 3 DEM files for the following bounds: [25.50965297 58.40783034 27.67946847 60.06743426]. As the top right corner's latitude is 60, elevation downloads srtm_42_00.tif file, and as there is no such file on the datasource, an empty file is being created.
The problem lies in srtm3_tile_ilonlat(lon, lat) function in datasource.py:53
return (ilon + 180) // 5 + 1, (64 - ilat) // 5
One possible would be to check if the file exists, and only then download it.