PHPackages                             ivone/coordtransform-php - 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. ivone/coordtransform-php

ActiveLibrary

ivone/coordtransform-php
========================

坐标转换

v0.1(3y ago)1206MITPHPPHP &gt;=7.0

Since Jun 23Pushed 3y agoCompare

[ Source](https://github.com/ivone-liu/coordtransform-php)[ Packagist](https://packagist.org/packages/ivone/coordtransform-php)[ RSS](/packages/ivone-coordtransform-php/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Welcome to coordtransform-php 👋
===============================

[](#welcome-to-coordtransform-php-)

> 提供百度坐标系(bd-09)、火星坐标系(国测局坐标系、gcj02)、WGS84坐标系的相互转换，基于 PHP 语言，无特殊依赖。
> 本库代码为 [wandergis/coordtransform](https://github.com/wandergis/coordtransform) 的 PHP 版，并根据 [ipcjs/coordtransform](https://github.com/ipcjs/coordtransform) 做了国内区域判断逻辑的优化。

JavaScript version：

Python version：[https://github.com/wandergis/coordTransform\_py](https://github.com/wandergis/coordTransform_py)

Cli version：

Go version：

Java version：

Example
-------

[](#example)

```
require_once 'coordtransform.php';

Coordtransform::gcj02ToBd09($lng, $lat);
Coordtransform::gcj02ToWgs84($lng, $lat);
Coordtransform::wgs84ToGcj02($lng, $lat);
Coordtransform::wgs84ToBd09($lng, $lat);
Coordtransform::bd09ToGcj02($lng, $lat);
Coordtransform::bd09ToWgs84($lng, $lat);
```

Test
----

[](#test)

```
PHP：

array (size=2)
    0 => float 101.66758917038
    1 => float 34.446565679398

array (size=2)
    0 => float 101.6593935994
    1 => float 34.44201870302

array (size=2)
    0 => float 101.6628764006
    1 => float 34.43883929698

array (size=2)
    0 => float 101.66933760126
    1 => float 34.444950045745

array (size=2)
    0 => float 101.65471487632
    1 => float 34.434211121566

array (size=2)
    0 => float 101.65298716899
    1 => float 34.435816401314

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Javascript:

(2) [101.66758917038334, 34.446565679397786]
(2) [101.65939359940022, 34.442018703020054]
(2) [101.66287640059979, 34.43883929697995]
(2) [101.66933760125637, 34.44495004574466]
(2) [101.65471487632013, 34.434211121566484]
(2) [101.65298716898793, 34.43581640131362]

```

Show your support
-----------------

[](#show-your-support)

Give a ⭐️ if this project helped you!

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1426d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2db404dda893163c40c4316776bb6a45d6e9199f366702626fddcf440e5b950e?d=identicon)[ivone-liu](/maintainers/ivone-liu)

---

Top Contributors

[![BNDong](https://avatars.githubusercontent.com/u/21150911?v=4)](https://github.com/BNDong "BNDong (5 commits)")

### Embed Badge

![Health badge](/badges/ivone-coordtransform-php/health.svg)

```
[![Health](https://phpackages.com/badges/ivone-coordtransform-php/health.svg)](https://phpackages.com/packages/ivone-coordtransform-php)
```

PHPackages © 2026

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