Skip to content

Read SRTM "The Shuttle Radar Topography Mission" elevation data from `.hgt` files in Rust.

License

Notifications You must be signed in to change notification settings

JeromeSchmied/srtm_reader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SRTM reader

A performant srtm reader for .hgt files in Rust.

Supported resolutions

  • 0.5 angle second (SRTM05) <- not sure that's how it's called

  • 1 angle second (SRTM1)

  • 3 angle second (SRTM3)

  • feel free to open an issue if you need more

Example

use srtm_reader::*;

let coord = (13.3255424, 56.92856);
// we get the filename, that shall include the elevation data for this `coord`
let filename = srtm_reader::get_filename(coord);
// load the srtm, .hgt file
// NOTE: to be able to load it, you'll need the actual file
let tile = srtm_reader::Tile::from_file(filename).unwrap();
// and finally, retrieve our elevation data
let elevation = tile.get(coord);

also, see cli example for a real-life one

Note

a great source of srtm data, .hgt files is Sonny's collection

Dependents

  • fit2gpx-rs
  • file an issue if yours could be listed as well

Disclaimer

this crate is a forked version of the srtm crate which hasn't been updated in 6 years, and the PR hasn't been merged either in a long time. I've needed 0.5 angle support and also some more convenience methods for fit2gpx-rs, and here we are.

About

Read SRTM "The Shuttle Radar Topography Mission" elevation data from `.hgt` files in Rust.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%