PHPackages                             geo-io/crs - 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. geo-io/crs

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

geo-io/crs
==========

Coordinate Reference System (CRS) utilities.

v2.0.0(4y ago)224.6k↓40.6%1MITPHPPHP ^8.0

Since Jan 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/geo-io/crs)[ Packagist](https://packagist.org/packages/geo-io/crs)[ RSS](/packages/geo-io-crs/feed)WikiDiscussions main Synced 1mo ago

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

Geo I/O CRS
===========

[](#geo-io-crs)

[![Build Status](https://github.com/geo-io/crs/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/geo-io/crs/actions/workflows/ci.yml)[![Coverage Status](https://camo.githubusercontent.com/530b0ac10b3e801f8dc2d046ac9544877cf3b73fbef868e5e6dbda61242e161e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f67656f2d696f2f6372732f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/geo-io/crs?branch=main)

[Coordinate Reference System](https://en.wikipedia.org/wiki/Spatial_reference_system) (CRS) utilities.

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

[](#installation)

Install [through composer](http://getcomposer.org). Check the [packagist page](https://packagist.org/packages/geo-io/crs) for all available versions.

```
composer require geo-io/crs
```

Usage
-----

[](#usage)

### `def_to_srid`

[](#def_to_srid)

Converts a CRS definition to a [Spatial Reference System Identifier](https://en.wikipedia.org/wiki/SRID) (SRID).

```
echo GeoIO\CRS\def_to_srid('urn:ogc:def:crs:OGC:1.3:CRS84')."\n";
echo GeoIO\CRS\def_to_srid('http://spatialreference.org/ref/epsg/4322')."\n";
```

The above example will produce the following output.

```
4326
4322

```

If the definition can't be converted to a SRID, it throws a `GeoIO\CRS\Exception\UnknownDefinitionException`.

### `srid_to_urn`

[](#srid_to_urn)

Converts a [Spatial Reference System Identifier](https://en.wikipedia.org/wiki/SRID)(SRID) to an URN.

```
echo GeoIO\CRS\srid_to_urn(4326)."\n";
echo GeoIO\CRS\srid_to_urn(4322)."\n";
```

The above example will produce the following output.

```
urn:ogc:def:crs:OGC:1.3:CRS84
urn:ogc:def:crs:EPSG::4322

```

License
-------

[](#license)

Copyright (c) 2016-2022 Jan Sorgalla. Released under the [MIT License](LICENSE).

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

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

Total

2

Last Release

1711d ago

Major Versions

v1.0.0 → v2.0.02021-09-10

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.3

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5de14776bbddf901c6e24d35829fe66fe997c303d53aca83cc7d1a90bb0b7110?d=identicon)[jsor](/maintainers/jsor)

---

Top Contributors

[![jsor](https://avatars.githubusercontent.com/u/55574?v=4)](https://github.com/jsor "jsor (20 commits)")

---

Tags

geogeographygeometryspatialiospatialgeocrssrssrid

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/geo-io-crs/health.svg)

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

###  Alternatives

[react/stream

Event-driven readable and writable streams for non-blocking I/O in ReactPHP

689126.8M194](/packages/react-stream)[mjaschen/phpgeo

Simple Yet Powerful Geo Library

1.6k8.6M22](/packages/mjaschen-phpgeo)[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[geo-io/interface

Geo I/O base interfaces.

626.1M7](/packages/geo-io-interface)[jmikola/geojson

GeoJSON implementation for PHP

3109.0M77](/packages/jmikola-geojson)[geokit/geokit

Geo-Toolkit for PHP

251924.7k6](/packages/geokit-geokit)

PHPackages © 2026

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