rstiff 0.2.0

A Rust library for high-precision, type-preserving GeoTiff I/O powered by GDAL.
//! # rstiff
//!
//! A high-precision, type-preserving Rust library for GeoTiff I/O and processing, powered by GDAL.
//!
//! ## Features
//!
//! - **High Precision**: Loads data into `ndarray::Array3<f64>` for accurate scientific computing.
//! - **Type-Preserving I/O**: Automatically restores the original data type when writing.
//! - **Smart NoData Handling**: Correctly handles NoData values and preserves transparency.
//! - **Window Reading**: Read only the data you need - by pixel coordinates, geographic bounds, or vector extent.
//! - **Reprojection**: Robust coordinate transformation with automatic bounds calculation.
//! - **Vector Cropping**: Crop rasters using Shapefile, KML, GeoJSON with optional masking.
//!
//! ## Quick Start
//!
//! ```ignore
//! use rstiff::GeoTiff;
//!
//! // Read a GeoTiff file
//! let tif = GeoTiff::read("input.tif")?;
//! println!("Dimensions: {:?}", tif.data.dim());
//!
//! // Write back (original data type is preserved)
//! tif.write("output.tif")?;
//! ```
//!
//! ## Window Reading (Memory Efficient)
//!
//! ```ignore
//! use rstiff::GeoTiff;
//!
//! // Only read a 256x256 tile - perfect for large files
//! let tile = GeoTiff::read_window("large.tif", 1000, 2000, 256, 256)?;
//!
//! // Read by geographic bounds
//! let roi = GeoTiff::read_bounds("large.tif", (116.0, 39.0, 117.0, 40.0))?;
//!
//! // Read by vector file extent
//! let roi = GeoTiff::read_by_vector("large.tif", "area.kml", true)?;
//! ```
//!
//! ## Metadata Without Loading Pixels
//!
//! ```ignore
//! use rstiff::GeoTiff;
//!
//! let info = GeoTiff::info("large.tif")?;
//! println!("Size: {}x{}", info.width, info.height);
//! println!("Bounds: {:?}", info.bounds());
//!
//! // Coordinate conversion
//! let (x, y) = info.pixel_to_geo(100, 200);
//! let (col, row) = info.geo_to_pixel(116.5, 39.5);
//! ```
//!
//! ## Prerequisites
//!
//! This library requires GDAL to be installed on your system:
//!
//! - **macOS**: `brew install gdal`
//! - **Ubuntu/Debian**: `sudo apt-get install libgdal-dev`
//!
//! ## Documentation
//!
//! Due to GDAL system dependency, docs.rs may fail to build documentation.
//! Generate documentation locally with:
//!
//! ```bash
//! cargo doc --open
//! ```

pub mod error;
pub mod geotiff;

// Re-exports for easier access
pub use error::TiffError;
pub use geotiff::GeoTiff;
pub use geotiff::RasterInfo;