|
188 | 188 | "## TIFF"
|
189 | 189 | ]
|
190 | 190 | },
|
| 191 | + { |
| 192 | + "cell_type": "markdown", |
| 193 | + "metadata": {}, |
| 194 | + "source": [ |
| 195 | + "TIFF (Tag Image File Format) is a *flexible* raster container widely used in biosciences, remote sensing and GIS. \n", |
| 196 | + "\n", |
| 197 | + "A **GeoTIFF** is simply a TIFF that stores additional additional georeferencing information tags (CRS, affine transform, etc.) so geospatial software knows where each pixel sits on Earth. \n", |
| 198 | + "\n", |
| 199 | + "* **Images (“IFDs”)** – each “page” in a TIFF holds a 2-D array of pixels. \n", |
| 200 | + "\n", |
| 201 | + " Multi-band rasters (e.g. RGB, multi-spectral) appear as *separate* IFDs or as extra samples within one IFD.\n", |
| 202 | + "\n", |
| 203 | + "* **Tags** – key–value metadata pairs (datatype, compression, nodata value, CRS, resolution, etc.). \n", |
| 204 | + " \n", |
| 205 | + " GeoTIFF adds standardised tags like ModelPixelScaleTag, ModelTiepointTag, GeoKeyDirectoryTag.\n", |
| 206 | + "\n", |
| 207 | + "* **Compression / tiling** – DEFLATE, LZW, etc. Tiling lets software fetch small windows efficiently.\n", |
| 208 | + "\n", |
| 209 | + "### Practical notes for xarray users\n", |
| 210 | + "\n", |
| 211 | + "* **Read** – use `rioxarray.open_rasterio()` (wraps rasterio) to get an immediate, Dask-chunked DataArray.\n", |
| 212 | + "\n", |
| 213 | + "* **Write** – `DataArray.rio.to_raster(\"out.tif\")`; choose compression + tiling via driver_kwargs.\n", |
| 214 | + "\n", |
| 215 | + "* **Dimensionality** – TIFF is inherently 2-D per band; no native time or vertical axis. If you need 4-D data, NetCDF or Zarr is usually a better fit.\n", |
| 216 | + "\n", |
| 217 | + "* **Metadata depth** – single-level tags only (no nested groups). For rich hierarchies, stick to HDF5 / NetCDF-4.\n", |
| 218 | + "\n", |
| 219 | + "* **Cloud-optimized GeoTIFF (COG)** – same format, arranged so HTTP range requests can stream windows efficiently; xarray handles it transparently when rasterio is compiled with libcurl.\n" |
| 220 | + ] |
| 221 | + }, |
| 222 | + { |
| 223 | + "cell_type": "markdown", |
| 224 | + "metadata": {}, |
| 225 | + "source": [ |
| 226 | + "### How does TIFF relate to xarray?\n", |
| 227 | + "\n" |
| 228 | + ] |
| 229 | + }, |
191 | 230 | {
|
192 | 231 | "cell_type": "markdown",
|
193 | 232 | "metadata": {},
|
|
0 commit comments