Skip to main content

Converts british national grid (OSBG36) to lat lon (WGS84) and vice versa.

Project description

BNG ⇄ LatLon

Converts british national grid (OSBG36) to lat lon (WGS84) and vice versa as used by

Originally authored by Hannah Fry.

NEW! importable, installable, PEP8 styled, pure python, doctested, with optional numba compiler support for 10x speed


Package includes:

The mathematical theory used here is set out in “A guide to coordinate systems in Great Britain” by Ordnance Survey.


Get the latest stable release from PyPi:

pip install bng_latlon

optional but recommend is numba compiler

pip install numba


>>> from bng_to_latlon import OSGB36toWGS84
>>> OSGB36toWGS84(538890, 177320)
(51.47779538331092, -0.0014016837826672265)
>>> from latlon_to_bng import WGS84toOSGB36
>>> WGS84toOSGB36(51.4778, -0.0014)
(538890.1053365842, 177320.49650700082)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bng-latlon, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size bng_latlon-1.0.2-py3-none-any.whl (2.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size bng_latlon-1.0.2.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page