Skip to content

write_geotiff builtin

write_geotiff(path, model, *, nodata=Ellipsis)

Writes a 2D BlockModel as a deflate-compressed GeoTIFF.

Parameters:

Name Type Description Default
path str or Path

The .tif file.

required
model BlockModel

A regular or masked grid with nz = 1, rotated by azimuth only. Each numeric column becomes a band named after it: float32 when every column is float32, float64 otherwise. Absent cells of a masked model are nodata. An "EPSG:<code>" CRS is written as GeoKeys, any other as the citation.

required
nodata float

Value written for nulls and stored in GDAL_NODATA; a column holding it raises InvalidInput.

-9999.0

Raises:

Type Description
InvalidInput

For sub-blocked or 3D (nz > 1) models, dip or rake rotations and text columns.

used in