Trefoil (formerly Clover)
Because today might be your lucky day.
**(note: this was renamed from clover on 4/20/2018 due to name conflicts on pypi)
Geospatial operations with NetCDF files and numpy arrays.
Why?
We needed a library to consolidate a series of utility scripts and general geospatial operations on NetCDF and numpy arrays. We found we were creating a lot of purpose built scripts for other projects involving lots of processing of NetCDF climate and model outputs. Where possible, we have been pulling out general patterns and placing them here. When we looked for existing work, we didn't find anything that quite met our needs, with a clean API and no strong assertions about data model or compliance with CF-conventions (we aspire to conventions, but not all data meet them).
Specifically, we want to provide:
- simple and fast API for rendering numpy arrays to images
- simple API to provide utility functions that make working with NetCDF data easier
- simple command line interface to make common operations easy and portable
- analysis operations to simplify using geometries alongside raster data
- analysis operations to summarize across various dimensions of spatial and temporal-spatial datasets (anything more than 3 dimensions makes our heads hurt!)
We are trying to avoid reimplementing anything well-handled elsewhere. Where possible, we contribute functionality to other libraries (e.g., rasterio) where we think that the functionality is general enough not to depend on living within trefoil.
Where is it being used?
This is a core dependency for ncdjango, our Django-based NetCDF map server.
We are using this on a variety of internal projects within the Conservation Biology Institute.
Installation
Trefoil is available on PyPi. To install, use:
$ pip install trefoil
Development
Poetry is used for managing dependencies in this project. To develop this project, install its dependencies with:
$ poetry install
Command line interface
This is currently undergoing heavy development.
See CLI docs for more information.
Work in progress
This is still under active development, as we have time and need. All APIs are subject to change until we hit version 1.0.
Specifically, we need to work on:
- standardizing API patterns
- documentation
- test coverage and correctness
- roadmap
Contributors:
With inspiration from Tim Sheehan and Ken Ferschweiler.
See Also:
- rasterio: Geospatial I/O and operations on rasters, done right.
- OCGIS: Geoprocessing on CF compatible climate datasets.
- scikit-image: Python image processing
- python-rasterstats: Summary statistics of rasters using geometries
Metadata
Release files for trefoil 0.4.3
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 | |
|---|---|---|---|---|
| trefoil-0.4.3.tar.gz | 1.0 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| trefoil-0.4.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.0 MB
Release files / trefoil-0.4.3.tar.gz
| Download URL | trefoil-0.4.3.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e0a7d3d07d678e86da05fb2c82ff4f00619ead461de14a5e167438e94645e2f
|
|
BLAKE2b-256 checksum How to use checksums |
b909be5a7392865aa23eaa06d07c3775d1f6a27c221394339ec264d0a7e762e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1020-azure
|
Release files / trefoil-0.4.3-py3-none-any.whl
| Download URL | trefoil-0.4.3-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d88c739eb8e9df121c6747c7a554030298b9536135197d013ecbff9e66f1f26c
|
|
BLAKE2b-256 checksum How to use checksums |
1e098eee0dd1f04299522f679d5424e79c53287397189e9f1a837610e27e7cff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1020-azure
|
Security for trefoil 0.4.3
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.