0

I want get elevation of point offline in my app I searched a lot but could not find anything for this.How can I do this?

We have a dem file and we may get altitude of point with coordinate (latitude and longitude)

freetux
  • 23
  • 3

1 Answers1

1

This library seems promising: https://github.com/komoot/batch-dem-reader

This Kotlin app also seems relevant: https://github.com/raynigon/raylevation

If none of the options give you what you need, you'll probably have to implement parsing the file yourself. For that, you can get inspiration from libraries written in other languages (e.g. https://github.com/tkrajina/srtm.py)

user3738870
  • 1,415
  • 2
  • 12
  • 24
  • The first case does not have enough documentation, it is not clear how it works. The second case is a web server and not for Kotlin or Java language, and the last case is good for inspiration, but unfortunately I don't have enough time for this. – freetux Aug 22 '22 at 15:52
  • It seems like this is not a very common scenario so unfortunately there are no good libraries for it in Java. The second one has some relevant code in it, but it's not directly usable (you have to copy paste a lot probably). You can see for example this class: https://github.com/raynigon/raylevation/blob/main/src/main/kotlin/com/raynigon/raylevation/srtm/service/SRTMService.kt – user3738870 Aug 22 '22 at 15:58
  • 1
    Thank you for your answer, I am trying to use these classes – freetux Aug 23 '22 at 02:48