Replace srtm4 dependency by SRTM DEM on GCS #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
srtm4is a python library that downloads srtm files locally and then reads them to extract elevation data at specific latitudes and longitudes. There are two problems withsrtm4:srtm4library requires special treatment to run locally on MacOS and complicates local development.Solution
We already have a Copernicus DEM on GCS which dynamically builds up as new tiles are required. We could obtain elevation data by very quickly reading the elevation points from these cloud optimized geotifs.I've downloaded the full SRTM v4.1 (90m) dataset at
gs://overstory-dtms/srtm_v41_90mand built a vrt index. This can be used to very efficiently query for elevations at specific latitudes and longitudes.To Do
Reproducibility
Here is a script demonstrating the difference between using SRTM ourselves instead of using srtm4 library:
Output is:
The values are very similar, but not exactly the same. It's possible that
srtm4does a bit more than just converting to ellipsoidal height. Maybe it's related to the half-pixel offset due to the srtm geotifs having the wrongAREA_OR_POINTtiftag: https://github.com/centreborelli/srtm4/blob/master/srtm4/raster.py#L2-L6