geographiclib 0.1.0

Library for solving geodesic problems, wrapper around GeographicLib
Documentation
  • Coverage
  • 64%
    16 out of 25 items documented4 out of 8 items with examples
  • Size
  • Source code size: 187.68 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 805.68 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • savage13/geographiclib
    3 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • savage13

GeographicLib

Documentation

A Rust interface to GeographicLib

A library for solving geodesic problems

Usage

Add this to your Cargo.toml:

[dependencies]
geographiclib = "0.1.0"

Example

use geographiclib::Geodesic;
let g = Geodesic::wgs84();
let (lat1, lon1) = (37.87622, -122.23558); // Berkeley, California
let (lat2, lon2) = (-9.4047, 147.1597);    // Port Moresby, New Guinea
let (d_deg, d_m, az1, az2) = g.inverse(lat1, lon1, lat2, lon2);

assert_eq!(d_deg, 96.39996198449684); // Distance in degrees
assert_eq!(d_m, 10700471.955233702);  // Distance in meters
assert_eq!(az1, -96.91639942294974);  // Azimuth at (lat1, lon1)
assert_eq!(az2, -127.32548874543627); // Azimuth at (lat2, lon2)

License

This version is released under the same license as GeographicLib; MIT/X11 License