Skip to main content

Crate oxigdal_geotiff

Crate oxigdal_geotiff 

Source
Expand description

OxiGDAL GeoTIFF Driver - Pure Rust GeoTIFF/COG Support

This crate provides a pure Rust implementation of GeoTIFF and Cloud Optimized GeoTIFF (COG) reading and writing capabilities.

§Features

  • std (default) - Enable standard library support
  • async - Enable async I/O support
  • deflate (default) - DEFLATE/zlib compression
  • lzw (default) - LZW compression
  • zstd - ZSTD compression
  • jpeg - JPEG compression (planned)
  • webp - WebP compression (planned)

§Example

use oxigdal_geotiff::cog::CogReader;
use oxigdal_core::io::FileDataSource;

let source = FileDataSource::open("image.tif")?;
let reader = CogReader::open(source)?;

println!("Image size: {}x{}", reader.width(), reader.height());
println!("Tile size: {:?}", reader.tile_size());
println!("Overview count: {}", reader.overview_count());

// Read a tile
let tile_data = reader.read_tile(0, 0, 0)?;

Re-exports§

pub use cog::CogReader;
pub use geokeys::GeoKey;
pub use geokeys::GeoKeyDirectory;
pub use geokeys::ModelType;
pub use geokeys::RasterType;
pub use tiff::Compression;
pub use tiff::ImageInfo;
pub use tiff::PhotometricInterpretation;
pub use tiff::TiffFile;
pub use tiff::TiffHeader;
pub use tiff::TiffTag;
pub use writer::CogWriter;
pub use writer::CogWriterOptions;
pub use writer::GeoTiffWriter;
pub use writer::GeoTiffWriterOptions;
pub use writer::OverviewResampling;
pub use writer::WriterConfig;

Modules§

adaptive_tiling
Adaptive tile size selection for Cloud Optimized GeoTIFF (COG).
band_algebra
Raster Band Algebra and Spectral Indices
cog
Cloud Optimized GeoTIFF (COG) support
color_space
Color space transformation support for GeoTIFF.
compression
Compression and decompression for TIFF data
geokeys
GeoTIFF GeoKey parsing
jpeg_codec
JPEG-in-TIFF decompression codec for TIFF compression types 6 and 7.
lerc_codec
LERC (Limited Error Raster Compression) codec for GeoTIFF
overviews
GeoTIFF overview (pyramid) generation and reading.
tiff
TIFF/BigTIFF file format parsing
writer
GeoTIFF and COG writing functionality

Structs§

GeoTiffReader
GeoTIFF reader (high-level API)

Functions§

is_cog
Checks if a TIFF appears to be a COG
is_tiff
Checks if data looks like a TIFF file