Reader for Kuva Space images
The reader project allows the reading of Kuva Space products from any part of its processing chain.
The Kuva Space images are in GeoTIFF format. The products consist of an image or multiple images along with its metadata to give all the necessary information to use the products. The metadata lives either in a Kuva Space database, or alternatively in a sidecar JSON file.
This library allows the reading of the image GeoTIFFs into rasterio.DatasetReader objects that
allow convenient raster manipulations, along with their kuva-metadata metadata objects.
Installation
pip install kuva-reader
Requirements
Python 3.10 to 3.13, preferably within a virtual environment
Code
Minimal example
This is a minimal example that allows you to read and print the image shape of a L2 product.
The result product is in this case an L2A product (as seen from the folder name).
The loaded product is stored in a rasterio.DatasetReader object, which contains extensive GIS functionalities (examples for usage).
from kuva_reader import read_product
product = read_product("my_data_folder/hyperfield1a_L2A_20250105T092548")
print(product) # Will show some main information such as image shape and CRS
This assumes a mostly untouched folder after distributing. Otherwise, you may need to read the product manually based on the product processing level:
from kuva_reader import Level2AProduct
l2a_product = Level2AProduct("your/l2a/folder")
The actual raster image is stored and can be analysed in product.image, while metadata
information of the product is in product.metadata.
Other tips
The product object attributes and methods allow the retrieval of other interesting information as well:
from kuva_reader import read_product
product = read_product("your/product/folder")
product.footprint(crs="EPSG:4326") # Footprint with option to transform CRS
product.image.shape # The image attribute contains all the image data
product.wavelengths # Wavelengths corresponding to image bands
product.crs # CRS
Processing levels
Currently the reader supports the following processing levels for Kuva products:
- L0: Radiometrically corrected frames as TOA radiance
- L1AB: Band-aligned product formed from multiple L0 products
- L1C: Georeferences and orthorectified L1 product
- L2A: Atmospherically corrected product as BOA reflectance
Special tags
All images generated by Kuva Space should have the following special tags added to the geotiff metadata.
_KUVA_PRODUCT_LEVEL: A string, e.g,"0"describing the level of the product._KUVA_PRODUCT_ID: The id on the database for the product associated with the geotiff.
This makes it very easy to pinpoint what product we are dealing with and works around the issue that our images are not a monolithic entity but rather just folders that can be messed with.
Contributing
Please follow the guidelines in CONTRIBUTING.md.
Also, please follow our Code of Conduct while discussing in the issues and pull requests.
Contact information
For questions or support, please open an issue. If you have been given a support contact, feel free to send them an email explaining your issue.
License
The kuva-reader project software is under the MIT license.
Status of unit tests
Metadata
Release files for kuva-reader 1.1.7
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 | |
|---|---|---|---|---|
| kuva_reader-1.1.7.tar.gz | 85.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kuva_reader-1.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 102.8 kB
Release files / kuva_reader-1.1.7.tar.gz
| Download URL | kuva_reader-1.1.7.tar.gz |
|---|---|
| Size | 85.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf9c7852aa0cd3deec169b29e7d11adfcab9c91f06e323869c4f6bfef593dd2c
|
|
BLAKE2b-256 checksum How to use checksums |
4b7c140a8013a689e09f91b4f50e366c1b98f7ce0d170889d615a56ffee5a326
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.13
|
Release files / kuva_reader-1.1.7-py3-none-any.whl
| Download URL | kuva_reader-1.1.7-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
562e72aaba0815e3b57887973e9b28c2c2159ae07bafa6c43a2d0cfe9d014c43
|
|
BLAKE2b-256 checksum How to use checksums |
5821f91d77f919c4b6412d3612dacf998d0a48f3d9f19988ea12b0839c56945e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.13
|
Security for kuva-reader 1.1.7
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.