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.
- EPSG:3857坐标系:即Web墨卡托投影坐标系,广泛用于Web地图服务如Google Maps、OpenStreetMap等
- EPSG:3857 Coordinate System: Also known as Web Mercator projection, widely used in web mapping services like Google Maps and OpenStreetMap.
功能特性 Features
- 火星坐标系 -> 百度坐标系 (
gcj02_to_bd09) - 百度坐标系 -> 火星坐标系 (
bd09_to_gcj02) - WGS84坐标系 -> 火星坐标系 (
wgs84_to_gcj02) - 火星坐标系 -> WGS84坐标系 (
gcj02_to_wgs84) - WGS84坐标系 -> 百度坐标系 (
wgs84_to_bd09) - 百度坐标系 -> WGS84坐标系 (
bd09_to_wgs84) - WGS84坐标系 -> EPSG:3857坐标系 (
wgs84_to_epsg3857) - EPSG:3857坐标系 -> WGS84坐标系 (
epsg3857_to_wgs84) - GCJ02坐标系 -> EPSG:3857坐标系 (
gcj02_to_epsg3857) - EPSG:3857坐标系 -> GCJ02坐标系 (
epsg3857_to_gcj02) - BD09坐标系 -> EPSG:3857坐标系 (
bd09_to_epsg3857) - EPSG:3857坐标系 -> BD09坐标系 (
epsg3857_to_bd09)
安装 Installation
在你的 Cargo.toml 中添加 Add the following to your Cargo.toml:
[]
= "0.3.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.