oxigdal-stac
Pure Rust STAC (SpatioTemporal Asset Catalog) support for cloud-native geospatial data.
Overview
oxigdal-stac provides comprehensive support for STAC (SpatioTemporal Asset Catalog), enabling efficient discovery and access to cloud-optimized geospatial datasets.
Features
- ✅ STAC v1.0.0 specification compliance
- ✅ Item, Collection, and Catalog models
- ✅ STAC API client (search, browse, query)
- ✅ Asset management and download
- ✅ Extension support (EO, SAR, Projection, etc.)
- ✅ Async API client
- ✅ Builder pattern for creating STAC objects
Installation
[]
= "0.1"
# With async HTTP client:
= { = "0.1", = ["async"] }
Quick Start
Reading STAC Items
use Item;
let json = read_to_string?;
let item: Item = from_str?;
println!;
println!;
println!;
Creating STAC Items
use ItemBuilder;
use BoundingBox;
let bbox = new?;
let item = new
.bbox
.datetime_utc
.collection
.add_asset
.build?;
let json = to_string_pretty?;
println!;
Searching STAC API
use StacClient;
use BoundingBox;
let client = new?;
// Search for Sentinel-2 data
let bbox = new?;
let items = client
.search
.collections
.bbox
.datetime
.max_items
.execute
.await?;
for item in items
Downloading Assets
use Asset;
let asset = item.assets.get
.ok_or?;
if let Some = &asset.href
STAC Extensions
Earth Observation (EO)
use ;
let eo = EoExtension ;
item.add_extension;
Projection
use ProjectionExtension;
let proj = ProjectionExtension ;
item.add_extension;
STAC Collections
use CollectionBuilder;
let collection = new
.title
.description
.license
.extent_spatial
.extent_temporal
.add_provider
.build?;
STAC Catalogs
use Catalog;
let catalog = Catalog ;
// Add items to catalog
catalog.add_child_link;
Validation
use StacValidator;
let validator = new;
let result = validator.validate_item?;
if !result.is_valid
Performance
- Item parsing: ~100μs
- Collection parsing: ~200μs
- API search: ~500ms (network dependent)
- Asset download: Streamed (minimal memory)
Features
std(default): Standard library supportasync: Async HTTP client for STAC APIreqwest: HTTP client implementation
Supported Extensions
- ✅ Earth Observation (EO)
- ✅ Synthetic Aperture Radar (SAR)
- ✅ Projection
- ✅ View Geometry
- ✅ Scientific Citation
- ✅ Electro-Optical (EO)
- ⏳ Label (v0.2.0)
COOLJAPAN Policies
- ✅ Pure Rust - No C dependencies
- ✅ No unwrap() - All errors handled
- ✅ STAC compliant - Follows v1.0.0 spec
- ✅ Well tested - Comprehensive test suite
License
Licensed under Apache-2.0.
Copyright © 2025 COOLJAPAN OU (Team Kitasan)