Grid datasets providing boundaries and identifiers for the Ordnance Survey (OS) British National Grid (BNG) index system at multiple spatial resolutions.
These datasets include grid square boundaries and associated identifiers as BNG references covering the bounds (0, 0, 700000, 1300000)
of the BNG index system. Data is supplied in both GeoParquet and GeoPackage (GPKG) formats. The GPKG is provided using 7-Zip compression .7z
due to the GitHub file size limits.
The repository also contains the Python script used for data generation and a Jupyter notebook demonstrating custom grid creation with the osbng
Python package.
Grid data is provided for the following 'standard' and 'intermediate' (quadtree) BNG resolutions:
- 100km
- 50km
- 10km
- 5km
- 1km
Grid data at finer BNG resolutions below 1km, or for custom geographic extents, can be generated by applying the same methods with different parameters. See the notebook example of creating custom BNG grid datasets.
Note: If you only need the ready-made grid datasets in osbng-grids/data/
, no environment setup is required. Set up an environment only if you plan to run the scripts, notebooks, or to generate custom grid datasets.
Install the dependencies listed in requirements.txt
using pip
:
pip install -r requirements.txt
Alternatively, create a conda
environment using the environment.yml
file:
conda env create -f environment.yml
conda activate osbng-grids
The OS BNG index system (also known as the OS National Grid) is a rectangular Cartesian 700 x 1300km grid system based upon the transverse Mercator projection. In the BNG, locations are specified using coordinates, eastings (x) and northings (y), measured in meters from a defined origin point (0, 0) southwest of the Isles of Scilly off the coast of Cornwall, England. Values increase to the northeast, covering all of mainland GB and surrounding islands.
The BNG index system is structured using a hierarchical system of grid squares at various resolutions. The BNG uses BNG references, also known more simply as grid or tile references, as grid square identifiers. At its highest level, the grid divides GB into 100 km by 100 km squares, each identified by a two-letter code. Successive levels of resolution further subdivide the grid squares into finer detail, down to individual 1-meter squares.
osbng-py
, a Python package supporting geospatial grid indexing and interaction with OS's BNG index systemosbng-r
, an R package with broad parity to theosbng
Python package.mosaic
, a Databricks package providing geospatial grid indexing using the BNG for Apache Spark.
Please acknowledge Ordnance Survey when using the grid datasets.
The code in this repository is licensed under the the MIT License.
The grid datasets (in the osbng-grids/data
directory) are licensed under the the Open Government Licence v3.0.