PHPackages                             zackad/normalize-coordinate - 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. zackad/normalize-coordinate

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

zackad/normalize-coordinate
===========================

Normalize Longitude and Latitude coordinate.

v0.1.1(8y ago)028MITPHP

Since Dec 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/zackad/normalize-coordinate)[ Packagist](https://packagist.org/packages/zackad/normalize-coordinate)[ RSS](/packages/zackad-normalize-coordinate/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

PHP Normalize Coordinate
========================

[](#php-normalize-coordinate)

[![travis-ci](https://camo.githubusercontent.com/c5a6beab8cce356aaa7f61d7d97749a7ec620392659d969be1c0e89781c7f026/68747470733a2f2f7472617669732d63692e6f72672f7a61636b61642f6e6f726d616c697a652d636f6f7264696e6174652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/zackad/normalize-coordinate)[![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/zackad/normalize-coordinate/blob/master/LICENSE)

Library to normalize Geographic Coordinate System (GCS) so the coordinate will be in the range of

```
-180 < longitude < 180
-90  < latitude  < 90

```

Installation
------------

[](#installation)

Install with composer

```
composer require zackad/normalize-coordinate
```

Usage
-----

[](#usage)

```
use Zackad\GIS\Coordinate\Normalize as Coordinate;

$coord = new Coordinate;

echo $coord->normalizeLongitude(200);
// will output '-160'

echo $coord->normalizeLatitude(-200);
// will output '20'

echo $coord->normalize(541.45, -90.55);
// will output '[-178.55, -89.45]'
```

API
---

[](#api)

`normalize($longitude, $latitude)` : return an array of coordinate point \[x, y\] or \[longitude, latitude\]

`normalizeLatitude($latitude)` : return normalized latitude coordinate whitin -90 &lt; latitude &lt; 90

`normalizeLongitude($longitude)` : return normalized longitude coordinate whitin -180 &lt; longitude &lt; 180

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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 ~10 days

Total

2

Last Release

3105d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10742906?v=4)[zackad](/maintainers/zackad)[@zackad](https://github.com/zackad)

---

Top Contributors

[![zackad](https://avatars.githubusercontent.com/u/10742906?v=4)](https://github.com/zackad "zackad (86 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zackad-normalize-coordinate/health.svg)

```
[![Health](https://phpackages.com/badges/zackad-normalize-coordinate/health.svg)](https://phpackages.com/packages/zackad-normalize-coordinate)
```

###  Alternatives

[fof/masquerade

User profile builder extension for your Flarum forum.

2024.6k4](/packages/fof-masquerade)

PHPackages © 2026

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