--- id: convertbng version: "1.0.0" license: BlueOak-1.0.0 license_treatment: unclear maintenance: active --- # convertbng — Fast lon, lat to and from ETRS89 and BNG (OSGB36) using the OS OSTN15 transform via Rust FFI License: unclear · Maintenance: active · Downloads: 100.3K/mo ## What it is and what it does convertbng is a Python wrapper around a Rust library that performs fast, accurate coordinate system transformations between WGS84 (decimal longitude/latitude) and two British/European grid systems: OSGB36 (British National Grid) and ETRS89. It uses the OS OSTN15 transformation for high accuracy when converting to BNG, and offers a faster direct projection option for ETRS89. The package accepts flexible input formats—single values, lists, tuples, numpy arrays, or any iterable—and returns results as lists of two lists (eastings and northings, or vice versa). The library is built as pre-compiled wheels for common platforms, so installation is straightforward and requires no compilation. It depends only on numpy and is designed for geospatial applications where accurate coordinate conversion between global WGS84 and UK/European grid systems is needed. The Rust backend ensures conversion speed even on large datasets, with optional Cython functions available for further performance gains on numpy arrays. Use it for: - Convert GPS coordinates to British National Grid for UK mapping applications - Transform survey data from WGS84 to ETRS89 for European geospatial analysis - Batch-process coordinate lists to align with UK ordnance survey data - Integrate coordinate transformation into GIS workflows mixing WGS84 and BNG systems - Validate that coordinates fall within the BNG bounding box before mapping ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts decimal WGS84 longitude/latitude coordinates to and from British National Grid (OSGB36) and ETRS89 coordinates using Rust FFI for speed. Yes, if you need accurate WGS84 to British National Grid or ETRS89 conversion. The package is actively maintained, has no known vulnerabilities, and offers fast Rust-backed performance with convenient Python APIs. The unclear license treatment warrants a quick verification, but the BlueOak-1.0.0 SPDX identifier suggests permissive licensing. Install friction is moderate due to compiled binaries, but pre-built wheels eliminate compilation for standard platforms. ## Install pip install convertbng uv add convertbng poetry add convertbng ## Installing convertbng Before you install: Medium install friction due to compiled Rust binaries, but pre-built wheels are available for common platforms (Linux x86_64/aarch64, macOS x86_64/arm64, Windows 64-bit). Requires Python 3.10+. Package is actively maintained with recent releases. License in practice: License treatment is marked unclear in the metadata; the SPDX identifier is BlueOak-1.0.0, which is a permissive open-source license, but you should verify the actual license terms before use. Quickstart: pip install convertbng from convertbng.util import convert_bng, convert_lonlat import numpy as np # Convert single coordinates res = convert_bng(lon, lat) # Convert arrays lons = np.array([lon1, lon2]) lats = np.array([lat1, lat2]) res_list = convert_bng(lons, lats) Requires Python 3.10 or later. Pre-built wheels available for Linux, macOS, and Windows 64-bit; other platforms require building from source with the lonlat_bng Rust library. Verify before relying: - Whether BlueOak-1.0.0 license is compatible with your project's licensing requirements - Performance characteristics on large coordinate arrays compared to alternatives - Whether OSTN15 coverage is sufficient for your geographic region of interest ## Package facts - License: BlueOak-1.0.0 (unclear) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 100.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags WGS84 to BNG conversion, longitude latitude to grid coordinates, OSGB36 ETRS89 transform, British National Grid converter, coordinate system conversion, geospatial coordinate transform, OSTN15 correction, geospatial, coordinate-transform, gis [View on SkillFed](https://skillfed.io/packages/convertbng) · [View on PyPI](https://pypi.org/project/convertbng/)