1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! # GeoTIFF
//!
//! A pure Rust library for reading and writing GeoTIFF files, including
//! BigTIFF (>4 GB), tiled layouts, and Cloud Optimized GeoTIFF (COG).
//!
//! ## Feature summary
//!
//! | Feature | API |
//! |---|---|
//! | Read stripped/tiled GeoTIFF | [`GeoTiff`] |
//! | Read BigTIFF (64-bit offsets) | [`GeoTiff`] (auto-detected) |
//! | Write stripped GeoTIFF | [`GeoTiffWriter`] |
//! | Write tiled GeoTIFF | [`GeoTiffWriter`] + [`WriteLayout::Tiled`] |
//! | Write BigTIFF | [`GeoTiffWriter::bigtiff`] |
//! | Write Cloud Optimized GeoTIFF | [`CogWriter`] |
//! | JPEG / LZW / Deflate / PackBits / None | [`Compression`] |
//!
//! ## Reading
//! ```rust,ignore
//! use wbraster::formats::geotiff_core::GeoTiff;
//! let tiff = GeoTiff::open("dem.tif").unwrap();
//! println!("{}×{} BigTIFF={}", tiff.width(), tiff.height(), tiff.is_bigtiff);
//! let data: Vec<f32> = tiff.read_band_f32(0).unwrap();
//! ```
//!
//! ## Writing (tiled + BigTIFF)
//! ```rust,ignore
//! use wbraster::formats::geotiff_core::{GeoTiffWriter, WriteLayout, Compression, SampleFormat, GeoTransform};
//! GeoTiffWriter::new(8192, 8192, 1)
//! .layout(WriteLayout::Tiled { tile_width: 512, tile_height: 512 })
//! .compression(Compression::Deflate)
//! .sample_format(SampleFormat::IeeeFloat)
//! .bigtiff(true)
//! .geo_transform(GeoTransform::north_up(0.0, 0.001, 8.192, -0.001))
//! .epsg(4326)
//! .write_f32("large.tif", &vec![0.0f32; 8192 * 8192])
//! .unwrap();
//! ```
//!
//! ## Cloud Optimized GeoTIFF
//! ```rust,ignore
//! use wbraster::formats::geotiff_core::{CogWriter, Compression, GeoTransform};
//! CogWriter::new(4096, 4096, 1)
//! .compression(Compression::Deflate)
//! .tile_size(512)
//! .geo_transform(GeoTransform::north_up(-180.0, 0.0879, 90.0, -0.0879))
//! .epsg(4326)
//! .write_f32("output.cog.tif", &vec![0.0f32; 4096 * 4096])
//! .unwrap();
//! ```
pub use ;
pub use Compression;
pub use ;
pub use ;
pub use TiffVariant;
pub use GeoTiff;
pub use ;
pub use GeoTransform;
pub use ;