Closed hari0603 closed 4 years ago
Not sure why that happened, but if that file in your ~/.cache/srtm
directory is really 70 bytes long -- can you try delete it manually and re-run that script. If it works then a fix for this problem is to just delete files with invalid size and let the library re-download them again.
Deleting it manually and re-running the script did not fix the problem. The same exception is being raised.
I am running the following script that is raising the mentioned exception:
import srtm
srtm_data = srtm.get_data()
srtm_data.get_elevation(24.056313, 35.003152)
Ahhh... Right. I tried to reproduce it with 35.003152, 24.056313
but then I figured out that's not "lat and lon" but "lon and lat".
Anyway... Should be fixed with this https://github.com/tkrajina/srtm.py/commit/4a6dbf7b5c4d79024f9869da4157db46d2c203a7
Wow. That was a quick fix! Thanks a ton.
I have been using this package for a while now to perform elevation based operation on Geospatial data and it has been very useful! But recently when I tried to fetch SRTM elevation for longitude, latitude as 35.003152, 24.056313 respectively, I got the following error:
I was trying to find a solution for this and stumbled upon a similar issue which was raised about 7 years back. The exception that is raised seems to be same but the cause of error is different.
Currently, I am circumventing the issue by manually downloading the .hgt file mentioned in the trace log from https://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Africa/.
Thanks again for the great work!