🇬🇧 BNG ⇄ LatLon🌐
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:
- bng_to_latlon.py originally published as "Converting British National Grid to Latitude and Longitude II"
- latlon_to_bng.py originally "Converting Latitude and Longitude to British National grid"
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.
Metadata
Release files for bng-latlon 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bng_latlon-1.1.tar.gz | 6.1 kB | Without provenance | Details |
Release files / bng_latlon-1.1.tar.gz
| Download URL | bng_latlon-1.1.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2428c3949907754b9c5db8abb34ac5d1ccbc190a131678ea74c76d146095f3d3
|
|
BLAKE2b-256 checksum How to use checksums |
d8b6a81011c3eb1a15120233fed7a08f88cc937dbbca9e3da3f8785baf6d4d57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.2
|
Security for bng-latlon 1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.