#wgs84 #china #gps #gcj-02 #bd-09

undrift_gps

在 GCJ-02、WGS-84 和 BD-09 之间进行坐标转换

4 个版本 (2 个破坏性更新)

0.3.1 2021 年 2 月 24 日
0.2.1 2021 年 2 月 22 日
0.1.1 2018 年 5 月 26 日
0.1.0 2018 年 5 月 26 日

#352科学

每月下载量 29

MIT 许可证

13KB
350

Undrift GPS

仅用 6 个函数实现地球与火星之间的穿越!保持简单和直接。

冯子立 致敬!

/// Convert a GCJ-02 coordinate into WGS-84
pub fn gcj_to_wgs(lat: f64, lon: f64) -> (f64, f64)

/// Convert a GCJ-02 coordinate into BD-09
pub fn gcj_to_bd(lat: f64, lon: f64) -> (f64, f64)

/// Convert a WGS-84 coordinate into GCJ-02
pub fn wgs_to_gcj(lat: f64, lon: f64) -> (f64, f64)

/// Convert a WGS-84 coordinate into BD-09
pub fn wgs_to_bd(lat: f64, lon: f64) -> (f64, f64)

/// Convert a BD-09 coordinate into GCJ-02
pub fn bd_to_gcj(lat: f64, lon: f64) -> (f64, f64)

/// Convert a BD-09 coordinate into WGS-84
pub fn bd_to_wgs(lat: f64, lon: f64) -> (f64, f64)

使用方法

将其添加到您的 Cargo.toml 中

[dependencies]
undrift_gps = "0.2.1"

无运行时依赖项