OS Data Downloader is a Python package designed to interact with the Ordnance Survey API, enabling users to query and download geospatial datasets such as urban areas, buildings, roads, and more. The package supports both open and premium products and provides tools for transforming CRS, querying specific features, and overlaying data on raster maps.
A python package to query and process Ordnance Survey data via the OSDataHub API
- Query and download geospatial data from the Ordnance Survey API.
- Supports both open and premium datasets.
- Seamlessly integrates with GeoTIFF files to extract metadata and transform bounding boxes.
- Provides pre-defined product dictionaries for quick access to datasets.
- Includes helper functions for CRS transformations and bounding box operations.
python -m pip install osdata_utils
From source:
git clone https://github.com/DGalexander/osdata-utils
cd osdata-utils
python -m pip install .
OS Data Downloader integrates seamlessly with both MapReader workflows and independent TIFF-based workflows:
- MapReader Integration:
- Extract bounding boxes directly from the maps.parents object.
- Leverages metadata from MapReader for spatial queries.
- TIFF-Based Workflow:
- Use Rasterio to extract bounding box and CRS from TIFF files.
- Works independently of MapReader.
See test_osdata_mapreader_integration.ipynb for example workflow.
The package includes access to the following datasets:
- Urban Areas
- Local and District Buildings
- Foreshore
- Greenspace
- National Parks
- Railways and Roads
- Surface Water
- Woodland
- Topographic Areas, Points, and Lines
- Detailed Path and Water Networks
- Functional Sites
- Greenspace Areas
See CONTRIBUTING.md for instructions on how to contribute.
Distributed under the terms of the MIT license.