PHPackages                             songbai/coord - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. songbai/coord

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

songbai/coord
=============

提供百度坐标系(bd-09)、火星坐标系(国测局坐标系、gcj02)、WGS84坐标系的相互转 基于PHP，无特殊依赖

3318↑150%1PHP

Since Oct 31Pushed 6y ago1 watchersCompare

[ Source](https://github.com/xiansongbai/coord)[ Packagist](https://packagist.org/packages/songbai/coord)[ RSS](/packages/songbai-coord/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

\#coordtransform 坐标转换

#### 参考

[](#参考)

```
https://github.com/wandergis/coordtransform
https://github.com/qichengzx/coordtransform

```

\#坐标系相关

```
WGS84坐标系：即地球坐标系，国际上通用的坐标系。
GCJ02坐标系：即火星坐标系，WGS84坐标系经加密后的坐标系。Google Maps，高德在用。
BD09坐标系：即百度坐标系，GCJ02坐标系经加密后的坐标系。
lat 纬度 log经度

```

\#安装

```
composer require songbai/coord

```

\#快速开始

```
use SongBai\Coord\Transform;

$tool = new Transform();

//BD09toGCJ02 百度坐标系->火星坐标系
$tool->BD09toGCJ02($lon,$lat); //return array($lon,$lat);

//GCJ02toBD09 火星坐标系->百度坐标系
$tool->GCJ02toBD09($lon,$lat);//return array($lon,$lat);

//WGS84toGCJ02 WGS84坐标系->火星坐标系
$tool->WGS84toGCJ02($lon,$lat);//return array($lon,$lat);

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a83dfb8aa8195fad31ec06eab09a51fd829040f0067f8e4ce05188e2bfd87edd?d=identicon)[xiansongbai](/maintainers/xiansongbai)

---

Top Contributors

[![iamxcd](https://avatars.githubusercontent.com/u/45652563?v=4)](https://github.com/iamxcd "iamxcd (2 commits)")

### Embed Badge

![Health badge](/badges/songbai-coord/health.svg)

```
[![Health](https://phpackages.com/badges/songbai-coord/health.svg)](https://phpackages.com/packages/songbai-coord)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
