PHPackages                             localgovdrupal/localgov\_os\_places\_geocoder\_provider - 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. localgovdrupal/localgov\_os\_places\_geocoder\_provider

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

localgovdrupal/localgov\_os\_places\_geocoder\_provider
=======================================================

Temporary home for our OS Places Geocoder provider.

1.x-dev(2y ago)154.8k↓35.9%[4 issues](https://github.com/localgovdrupal/localgov_os_places_geocoder_provider/issues)[1 PRs](https://github.com/localgovdrupal/localgov_os_places_geocoder_provider/pulls)1GPL-2.0-or-laterPHP

Since Nov 4Pushed 4d ago8 watchersCompare

[ Source](https://github.com/localgovdrupal/localgov_os_places_geocoder_provider)[ Packagist](https://packagist.org/packages/localgovdrupal/localgov_os_places_geocoder_provider)[ Docs](https://github.com/localgovdrupal/localgov_os_places_geocoder_provider)[ RSS](/packages/localgovdrupal-localgov-os-places-geocoder-provider/feed)WikiDiscussions 1.x Synced 3d ago

READMEChangelog (1)Dependencies (6)Versions (7)Used By (1)

OS Places PHP Geocoder provider
===============================

[](#os-places-php-geocoder-provider)

Temporary home for our OS Places [PHP Geocoder](https://geocoder-php.org/) provider.

PHP Geocoder plugin for the [Ordnance Survey Places API](https://osdatahub.os.uk/docs/places/overview). Looks up addresses based on the given street address or postcode. Resultant addresses include both Easting and Northing as well as latitude and longitude as location coordinates. The values of Easting and Northing are in the [All numeric grid reference](https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid#All-numeric_grid_references) format.

Search results can be filtered for a single local authority based on its [Local custodian code](https://www.ordnancesurvey.co.uk/documents/product-support/support/addressbase-local-custodian-codes.zip).

This Geocoder requires an API key.

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

[](#installation)

```
$ composer require localgovdrupal/localgov_os_places_geocoder_provider

```

Sample Usage
------------

[](#sample-usage)

### Setup

[](#setup)

```
$ composer require localgovdrupal/localgov_os_places_geocoder_provider:1.x-dev php-http/guzzle6-adapter php-http/message

```

### Code

[](#code)

```
use Http\Adapter\Guzzle6\Client as Guzzle;
use Geocoder\Query\GeocodeQuery;
use LocalgovDrupal\OsPlacesGeocoder\Provider\OsPlacesGeocoder;

$http_client        = new Guzzle();
$generic_query_url  = 'https://api.os.uk/search/places/v1/find';
$postcode_query_url = 'https://api.os.uk/search/places/v1/postcode';
$our_api_key        = 'API-KEY-GOES-HERE';

$provider = new OsPlacesGeocoder($http_client, $generic_query_url, $postcode_query_url, $our_api_key);
$result   = $provider->geocodeQuery(GeocodeQuery::create('BN1 1JE'));
$address  = $result->first()->toArray();
print_r($address);

// Restrict lookup to a single local authority.
$query    = GeocodeQuery::create('Brighton pier')->withData('local_custodian_code', 1445);
$result   = $provider->geocodeQuery($query);
$address  = $result->first()->toArray();
print_r($address);

```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance45

Moderate activity, may be stable

Popularity31

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~618 days

Total

2

Last Release

219d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd550678a915c9a6d451d08851556a1c866f8cc7c0e3f864b498a45d4d930577?d=identicon)[stephen-cox](/maintainers/stephen-cox)

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

![](https://www.gravatar.com/avatar/848d88262b2f9d984d12b55bd4a2e2f0e1d3c7abe9c63fc5cc13ecbab75cd19e?d=identicon)[ekes](/maintainers/ekes)

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

![](https://www.gravatar.com/avatar/b34de4d6c68a26fa8eb3fd78cf8040597decc2fdcd4776f8fd704686adcb5a99?d=identicon)[Adnan-cds](/maintainers/Adnan-cds)

![](https://www.gravatar.com/avatar/307b0890997e4cfa0b6508abddb17d044cc1095ae4e5b9df17517b5373938758?d=identicon)[MattOz-CDS](/maintainers/MattOz-CDS)

---

Top Contributors

[![Adnan-cds](https://avatars.githubusercontent.com/u/50206849?v=4)](https://github.com/Adnan-cds "Adnan-cds (16 commits)")[![ekes](https://avatars.githubusercontent.com/u/237186?v=4)](https://github.com/ekes "ekes (1 commits)")[![finnlewis](https://avatars.githubusercontent.com/u/326588?v=4)](https://github.com/finnlewis "finnlewis (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/localgovdrupal-localgov-os-places-geocoder-provider/health.svg)

```
[![Health](https://phpackages.com/badges/localgovdrupal-localgov-os-places-geocoder-provider/health.svg)](https://phpackages.com/packages/localgovdrupal-localgov-os-places-geocoder-provider)
```

###  Alternatives

[toin0u/geocoder-laravel

Geocoder Service Provider for Laravel

7615.4M17](/packages/toin0u-geocoder-laravel)[geocoder-php/google-maps-provider

Geocoder GoogleMaps adapter

18719.3M53](/packages/geocoder-php-google-maps-provider)[smile/module-store-locator

Smile Store Locator

50533.0k5](/packages/smile-module-store-locator)[geocoder-php/here-provider

Geocoder here adapter

131.2M3](/packages/geocoder-php-here-provider)[geocoder-php/mapbox-provider

Geocoder Mapbox adapter

131.1M2](/packages/geocoder-php-mapbox-provider)[smile/module-map

Smile Map Utilities Module

10554.7k3](/packages/smile-module-map)

PHPackages © 2026

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