coordtransform-rs
提供百度坐标系(BD09)、火星坐标系(国测局坐标系、GCJ02)、WGS84坐标系的相互转换,基于 Rust 语言,无特殊依赖。 Provides mutual conversion between Baidu Coordinate System (BD09), Mars Coordinate System (GCJ02), and WGS84 Coordinate System, implemented in Rust with no special dependencies.
这是 Go版本 的 Rust 移植版本。 This is the Rust port of the Go version.
坐标系说明 Coordinate System Description
- WGS84坐标系:即地球坐标系,国际上通用的坐标系
- WGS84 Coordinate System: The Earth coordinate system, commonly used internationally.
- GCJ02坐标系:即火星坐标系,WGS84坐标系经加密后的坐标系。Google Maps,高德在用
- GCJ02 Coordinate System: Also known as the Mars coordinate system, an encrypted version of the WGS84 coordinate system. Used by Google Maps and Amap.
- BD09坐标系:即百度坐标系,GCJ02坐标系经加密后的坐标系
- BD09 Coordinate System: Also known as the Baidu coordinate system, an encrypted version of the GCJ02 coordinate system.
功能特性 Features
- 火星坐标系 -> 百度坐标系 (
gcj02_to_bd09
) - 百度坐标系 -> 火星坐标系 (
bd09_to_gcj02
) - WGS84坐标系 -> 火星坐标系 (
wgs84_to_gcj02
) - 火星坐标系 -> WGS84坐标系 (
gcj02_to_wgs84
) - WGS84坐标系 -> 百度坐标系 (
wgs84_to_bd09
) - 百度坐标系 -> WGS84坐标系 (
bd09_to_wgs84
)
安装 Installation
在你的 Cargo.toml
中添加 Add the following to your Cargo.toml
:
[]
= "0.1.0"
快速开始 Quick Start
use *;
基准测试 Benchmarking
运行基准测试 Run the benchmark tests:
测试 Testing
运行测试 Run the tests:
许可证 License
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。 This project is licensed under the MIT License - see the LICENSE file for details.