PHPackages                             agencelimitless/geo-parser - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. agencelimitless/geo-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

agencelimitless/geo-parser
==========================

Parser for geography coordinate strings

3.0.0(6y ago)0401MITPHPPHP &gt;=5.6

Since Mar 23Pushed 6y agoCompare

[ Source](https://github.com/agencelimitless/geo-parser)[ Packagist](https://packagist.org/packages/agencelimitless/geo-parser)[ RSS](/packages/agencelimitless-geo-parser/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (16)Used By (1)

creof/geo-parser
================

[](#creofgeo-parser)

[![Code Climate](https://camo.githubusercontent.com/c6e3c65c6dca44812be32fd387bcaed973628dca1a0c06cd3a921a27b3af6c8e/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6372656f662f67656f2d7061727365722f6261646765732f6770612e737667)](https://codeclimate.com/github/creof/geo-parser)[![Test Coverage](https://camo.githubusercontent.com/63a8b588769e25b48115a7949f83136b411b3d4bf6831261fbb6a0def0cfde88/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6372656f662f67656f2d7061727365722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/creof/geo-parser/coverage)[![Build Status](https://camo.githubusercontent.com/4bf371df1e1d6ae2c95fd3ef07e3571696eb0453eb1fe840a3a1287ebc1e1940/68747470733a2f2f7472617669732d63692e6f72672f6372656f662f67656f2d7061727365722e737667)](https://travis-ci.org/creof/geo-parser)

Lexer and parser library for geometric and geographic point string values.

Usage
-----

[](#usage)

There are two use patterns for the parser. The value to be parsed can be passed into the constructor, then parse() called on the returned `Parser` object:

```
$input  = '79°56′55″W, 40°26′46″N';

$parser = new Parser($input);

$value = $parser->parse();
```

If many values need to be parsed, a single `Parser` instance can be used:

```
$input1 = '56.242 E';
$input2 = '40:26:46 S';

$parser = new Parser();

$value1 = $parser->parse($input1);
$value2 = $parser->parse($input2);
```

Supported Formats
-----------------

[](#supported-formats)

Both single values and pairs are supported. Some samples of supported formats are below, though not every possible iteration may be explicitly specified:

1. Simple single signed values

- 40
- -40
- -8.543
- +132
- +77.2

2. Simple single signed values with degree symbol

- 40°
- -40°
- -5.234°
- +43°
- +38.43°

3. Single unsigned values with or without degree symbol, and cardinal direction

- 40° N
- 40 S
- 56.242 E

4. Single values of signed integer degrees with degree symbol, and decimal minutes with apostrophe

- 40° 26.222'
- -65° 32.22'
- +165° 52.22'

5. Single values of unsigned integer degrees with degree symbol, decimal minutes with apostrophe, and cardinal direction

- 40° 26.222' E
- 65° 32.22' S

6. Single values of signed integer degrees with degree symbol, integer minutes with apostrophe, and optional integer or decimal seconds with quote

- 40° 26' 46"
- -79° 58' 56"
- 93° 19' 25.8"
- +120° 19' 25.8"

6. Single values of signed integer degrees with colon symbol, integer minutes, and optional colon and integer or decimal seconds

- +40:26:46
- -79:58:56
- 93:19:25.8

7. Single values of unsigned integer degrees with degree symbol, integer minutes with apostrophe, optional integer or decimal seconds with quote, and cardinal direction

- 40° 26' 46" S
- 99° 58' 56" W
- 44° 58' 53.9" N

7. Single values of unsigned integer degrees with colon symbol, integer minutes with, optional colon and integer or decimal seconds, and cardinal direction

- 40:26:46 S
- 99:58:56 W
- 44:58:53.9 N

8. Two of any one format separated by whitespace
9. Two of any one format separated by a comma

Return
------

[](#return)

The parser will return a integer/float or an array containing a pair of these values.

Exceptions
----------

[](#exceptions)

The `Lexer` and `Parser` will throw exceptions implementing interface `CrEOF\Geo\String\Exception\ExceptionInterface`.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 89.3% 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 ~150 days

Recently: every ~338 days

Total

14

Last Release

2473d ago

Major Versions

0.0.8 → 1.0.02015-11-11

1.0.1 → 2.0.02015-11-18

2.1.0 → 3.0.02019-08-02

PHP version history (2 changes)0.0.1PHP &gt;=5.3.3

3.0.0PHP &gt;=5.6

### Community

Maintainers

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

---

Top Contributors

[![djlambert](https://avatars.githubusercontent.com/u/1187338?v=4)](https://github.com/djlambert "djlambert (109 commits)")[![Gurdarrag](https://avatars.githubusercontent.com/u/18448952?v=4)](https://github.com/Gurdarrag "Gurdarrag (6 commits)")[![sadortun](https://avatars.githubusercontent.com/u/794449?v=4)](https://github.com/sadortun "sadortun (6 commits)")[![JanJakes](https://avatars.githubusercontent.com/u/141436?v=4)](https://github.com/JanJakes "JanJakes (1 commits)")

---

Tags

stringparserlexertextgeometrygeographyspatialgeocoordinate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/agencelimitless-geo-parser/health.svg)

```
[![Health](https://phpackages.com/badges/agencelimitless-geo-parser/health.svg)](https://phpackages.com/packages/agencelimitless-geo-parser)
```

###  Alternatives

[creof/geo-parser

Parser for geography coordinate strings

624.4M15](/packages/creof-geo-parser)[creof/wkt-parser

Parser for well-known text (WKT) object strings

554.8M16](/packages/creof-wkt-parser)[creof/wkb-parser

Parser for well-known binary (WKB/EWKB) object data

615.1M16](/packages/creof-wkb-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4485.3M4](/packages/martin-georgiev-postgresql-for-doctrine)[geo-io/wkb-parser

Well-known binary (WKB) Parser.

786.0M48](/packages/geo-io-wkb-parser)

PHPackages © 2026

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