PHPackages                             maosea0125/coords - 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. maosea0125/coords

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

maosea0125/coords
=================

coords distance and transform

v1.0.1(8y ago)194.1kMITPHPPHP &gt;=5.3

Since Sep 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/maosea0125/coords)[ Packagist](https://packagist.org/packages/maosea0125/coords)[ RSS](/packages/maosea0125-coords/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

coords
======

[](#coords)

提供了坐标距离计算；百度坐标（BD09）、国测局坐标（火星坐标，GCJ02）、和WGS84坐标系之间的转换

距离计算代码参考：
坐标转换代码参考：

---

当前互联网地图的坐标系现状
-------------

[](#当前互联网地图的坐标系现状)

### 地球坐标 (WGS84)

[](#地球坐标-wgs84)

- 国际标准，从 GPS 设备中取出的数据的坐标系
- 国际地图提供商使用的坐标系

### 火星坐标 (GCJ-02)也叫国测局坐标系

[](#火星坐标-gcj-02也叫国测局坐标系)

- 中国标准，从国行移动设备中定位获取的坐标数据使用这个坐标系
- 国家规定： 国内出版的各种地图系统（包括电子形式），必须至少采用GCJ-02对地理位置进行首次加密。

### 百度坐标 (BD-09)

[](#百度坐标-bd-09)

- 百度标准，百度 SDK，百度地图，Geocoding 使用
- (本来就乱了，百度又在火星坐标上来个二次加密)

开发过程需要注意的事
----------

[](#开发过程需要注意的事)

- 从设备获取经纬度（GPS）坐标

    ```
          如果使用的是百度sdk那么可以获得百度坐标（bd09）或者火星坐标（GCJ02),默认是bd09
          如果使用的是ios的原生定位库，那么获得的坐标是WGS84
          如果使用的是高德sdk,那么获取的坐标是GCJ02

    ```
- 互联网在线地图使用的坐标系

    ```
      火星坐标系：
              iOS 地图（其实是高德）
              Google国内地图（.cn域名下）
              搜搜、阿里云、高德地图、腾讯
      百度坐标系：
              当然只有百度地图
      WGS84坐标系：
              国际标准，谷歌国外地图、osm地图等国外的地图一般都是这个

    ```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~126 days

Total

2

Last Release

3136d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1742589?v=4)[John.mao](/maintainers/maosea0125)[@maosea0125](https://github.com/maosea0125)

---

Top Contributors

[![maosea0125](https://avatars.githubusercontent.com/u/1742589?v=4)](https://github.com/maosea0125 "maosea0125 (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/maosea0125-coords/health.svg)

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

###  Alternatives

[tomatophp/filament-pwa

get a PWA feature on your FilamentPHP app with settings from panel

9224.6k](/packages/tomatophp-filament-pwa)[jayesbe/php-process-executive

Control execution of script in child processes

189.9k](/packages/jayesbe-php-process-executive)

PHPackages © 2026

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