geost.bro.geotop.GeotopUnits.to_qml#
- GeotopUnits.to_qml(path: str, *, column: str | None = None, field: str | None = None, layer_type: str = 'vector', band: int = 1) None[source]#
Export metadata as a QGIS polygon vector or paletted raster style.
- Parameters:
path (str) – Path and filename where the generated QGIS style file will be written.
column (str, optional) – Metadata column whose values QGIS uses to choose a color for each feature or raster cell. Choose
self._nrfor voxel numbers orself._unitfor unit codes. Defaults toself._nr; raster styles only support voxel numbers.field (str, optional) – Name of the field in the vector file containing the values from
column. QGIS matches each feature’s value to the metadata to choose its color. Defaults to the name ofcolumnand is not used for raster styles.layer_type (str, optional) – Choose
"vector"(default) to color features based onfield, or"raster"to color raster cells using voxel numbers.band (int, optional) – Raster band containing the voxel numbers that should receive the style colors. Defaults to 1 and is only used for raster styles.
- Raises:
ValueError – If an option is invalid, unit codes are used for a raster, the metadata table is empty, or an RGB value is outside the valid range.