Skip to content

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

License

Notifications You must be signed in to change notification settings

fmalina/blocl-bnglatlon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🇬🇧 BNG ⇄ LatLon🌐

pypi


Converts british national grid eastings and northings (OSBG36) to latitude and longitude (WGS84) and vice versa as used by https://blocl.uk

Originally authored by Hannah Fry.

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

Documentation

Package includes:

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

Installation

Get the latest stable release from PyPi:

pip install bng_latlon

optional but recommend is numba compiler

pip install numba

Usage

>>> from bng_latlon import OSGB36toWGS84
>>> OSGB36toWGS84(538890, 177320)
(51.477795, -0.001402)
...
>>> from bng_latlon import WGS84toOSGB36
>>> WGS84toOSGB36(51.4778, -0.0014)
(538890.1053, 177320.4965)

MIT licensed. Designed in the UK, published from Slovakia. Blocl Schools.