Skip to main content

Crate oxigdal_temporal

Crate oxigdal_temporal 

Source
Expand description

OxiGDAL Temporal Analysis

Comprehensive multi-temporal raster analysis library for geospatial time series.

This crate provides advanced temporal analysis capabilities for raster data including:

  • Time-indexed raster collections with lazy loading
  • Temporal compositing (median, mean, max NDVI, quality-weighted)
  • Temporal interpolation and gap filling
  • Temporal aggregation (daily, weekly, monthly, yearly, rolling)
  • Change detection (BFAST, LandTrendr, differencing)
  • Trend analysis (Mann-Kendall, Sen’s slope, linear regression)
  • Seasonality detection and decomposition
  • Anomaly detection
  • Time series forecasting
  • Breakpoint detection
  • Multi-dimensional data cube operations

§Features

  • timeseries - Time series raster collections
  • compositing - Temporal compositing methods
  • interpolation - Temporal interpolation
  • aggregation - Temporal aggregation
  • change_detection - Change detection algorithms
  • trend_analysis - Trend analysis methods
  • phenology - Vegetation phenology
  • datacube - Data cube operations
  • zarr - Zarr storage integration
  • parallel - Parallel processing support

§Examples

§Creating a Time Series

use oxigdal_temporal::timeseries::{TimeSeriesRaster, TemporalMetadata};
use chrono::{DateTime, NaiveDate, Utc};
use scirs2_core::ndarray::Array3;

let mut ts = TimeSeriesRaster::new();

let dt = DateTime::from_timestamp(1640995200, 0).expect("valid timestamp");
let date = NaiveDate::from_ymd_opt(2022, 1, 1).expect("valid date");
let metadata = TemporalMetadata::new(dt, date);
let data = Array3::zeros((100, 100, 3));

ts.add_raster(metadata, data).expect("should add");

§Temporal Compositing

use oxigdal_temporal::compositing::{TemporalCompositor, CompositingConfig, CompositingMethod};

let config = CompositingConfig {
    method: CompositingMethod::Median,
    max_cloud_cover: Some(20.0),
    ..Default::default()
};

let composite = TemporalCompositor::composite(&ts, &config)
    .expect("should create composite");

§Trend Analysis

use oxigdal_temporal::analysis::trend::{TrendAnalyzer, TrendMethod};

let result = TrendAnalyzer::analyze(&ts, TrendMethod::MannKendall)
    .expect("should analyze trend");

§Change Detection

use oxigdal_temporal::change::{ChangeDetector, ChangeDetectionConfig, ChangeDetectionMethod};

let config = ChangeDetectionConfig {
    method: ChangeDetectionMethod::BFAST,
    ..Default::default()
};

let changes = ChangeDetector::detect(&ts, &config)
    .expect("should detect changes");

Re-exports§

pub use error::Result;
pub use error::TemporalError;
pub use timeseries::CubeDimensions;
pub use timeseries::CubeMetadata;
pub use timeseries::DataCube;
pub use timeseries::PixelStatistics;
pub use timeseries::TemporalMetadata;
pub use timeseries::TemporalRasterEntry;
pub use timeseries::TemporalResolution;
pub use timeseries::TimeSeriesRaster;
pub use timeseries::TimeSeriesStats;
pub use stack::InterpolationMethod;
pub use stack::RasterStack;
pub use stack::StackConfig;
pub use stack::StackMetadata;
pub use analysis::anomaly::AnomalyDetector;
pub use analysis::anomaly::AnomalyMethod;
pub use analysis::anomaly::AnomalyResult;
pub use analysis::forecast::ForecastMethod;
pub use analysis::forecast::ForecastParams;
pub use analysis::forecast::ForecastResult;
pub use analysis::forecast::Forecaster;
pub use analysis::seasonality::SeasonalityAnalyzer;
pub use analysis::seasonality::SeasonalityMethod;
pub use analysis::seasonality::SeasonalityResult;
pub use analysis::trend::TrendAnalyzer;
pub use analysis::trend::TrendMethod;
pub use analysis::trend::TrendResult;
pub use compositing::CompositeResult;
pub use compositing::CompositingConfig;
pub use compositing::CompositingMethod;
pub use compositing::TemporalCompositor;
pub use change::BreakpointDetector;
pub use change::BreakpointMethod;
pub use change::BreakpointParams;
pub use change::BreakpointResult;
pub use change::ChangeDetectionConfig;
pub use change::ChangeDetectionMethod;
pub use change::ChangeDetectionResult;
pub use change::ChangeDetector;
pub use gap_filling::GapFillMethod;
pub use gap_filling::GapFillParams;
pub use gap_filling::GapFillResult;
pub use gap_filling::GapFiller;
pub use aggregation::AggregationConfig;
pub use aggregation::AggregationResult;
pub use aggregation::AggregationStatistic;
pub use aggregation::TemporalAggregator;
pub use aggregation::TemporalWindow;
pub use phenology::PhenologyConfig;
pub use phenology::PhenologyExtractor;
pub use phenology::PhenologyMethod;
pub use phenology::PhenologyMetrics;

Modules§

aggregation
Temporal Aggregation Module
analysis
Temporal Analysis Module
change
Change Detection Module
compositing
Temporal Compositing Module
error
Error types for OxiGDAL Temporal Analysis
gap_filling
Gap Filling Module
interpolation
Legacy interpolation module - use gap_filling instead
phenology
Vegetation Phenology Module
stack
Raster Stack Operations Module
timeseries
Time Series Raster Module
trend
Legacy trend module - use analysis::trend instead

Constants§

VERSION
Library version

Functions§

version
Get library version information