eorst 1.0.1

Earth Observation and Remote Sensing Toolkit - library for raster processing pipelines
docs.rs failed to build eorst-1.0.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

EORST - Earth Observation and Remote Sensing Toolkit

A Rust library for simplifying raster processing pipelines in Earth observation workflows.

Quick Start

[dependencies]
eorst = "1.0"

Highlights

  • Parallel read/write - Block-based parallel processing with rayon
  • On-the-fly reprojection - Automatic image alignment and coordinate transformation
  • Point sampling - Efficient raster value extraction at point locations
  • Time series analysis - Multi-temporal data handling
  • Band math - Built-in arithmetic operations on raster bands
  • ML integration - Optional LightGBM and OpenCV support

Example

From STAC Query (ODC-style workflow)

use rss_core::{query::ImageQueryBuilder, qvf::Collection, DEA};
use eorst::{RasterDatasetBuilder, RasterDataset};
use chrono::NaiveDate;
use std::path::PathBuf;

// Query satellite imagery from a STAC catalog
let query = ImageQueryBuilder::new(
    DEA,
    Collection::Sentinel2,
    rss_core::utils::Intersects::Scene(vec!["56jns".to_string()]),
)
.start_date(NaiveDate::parse_from_str("2022-01-01", "%Y-%m-%d").unwrap())
.end_date(NaiveDate::parse_from_str("2022-06-01", "%Y-%m-%d").unwrap())
.cloudcover((rss_core::utils::Cmp::Less, 10))
.canonical_bands(["red", "nir"])
.build();

// Download and create a RasterDataset
let feature_collection = query.get(&PathBuf::from("/tmp"), None, None)?;
let rds = RasterDatasetBuilder::from_stac_query(&feature_collection)
    .block_size(eorst::utils::BlockSize { rows: 2048, cols: 2048 })
    .build();

// Process with `apply` - receives RasterDataBlock with metadata
rds.apply::<i16>(
    |block| {
        // Select layers by name using the Select trait
        let red = block.select_layers(&["red"])?;
        let nir = block.select_layers(&["nir"])?;
        
        // Compute NDVI: (NIR - Red) / (NIR + Red)
        let ndvi = (&nir.data - &red.data) / (&nir.data + &red.data + 1e-10);
        Ok(ndvi.insert_axis(ndarray::Axis(1)))
    },
    4,  // number of CPU threads
    &PathBuf::from("ndvi.tif"),
)?;

From Local Files with Layer Selection

use eorst::{RasterDatasetBuilder, DataSourceBuilder, Select};
use ndarray::Array4;
use std::path::PathBuf;

// Load specific bands with custom names
let data_source = DataSourceBuilder::from_file(&PathBuf::from("path/to/raster.tif"))
    .bands(vec![3, 4])           // Band indices
    .set_names(vec!["red", "nir"])  // Assign names
    .build();

let rds = RasterDatasetBuilder::from_source(&data_source)
    .block_size(eorst::utils::BlockSize { cols: 256, rows: 256 })
    .build();

// Process with automatic layer selection by name
rds.apply::<i16>(
    |block| {
        // No need to remember indices - use semantic names!
        let data = block.select_layers(&["nir"])?;  // Get NIR band
        Ok(data.data * 2)  // Double the NIR values
    },
    2,
    &PathBuf::from("output.tif"),
)?;

Documentation

Full documentation: https://docs.rs/eorst

See also: EORST Documentation Site

Features

Feature Description
use_opencv Computer vision operations (erosion, dilation, etc.)
use_lgbm LightGBM machine learning integration
use_polars Polars DataFrame support for zonal statistics
use_rss rss_core integration for remote sensing workflows

License

LGPL-3.0-or-later