sec_interp.core.validation.layer_metadata module

QGIS-agnostic layer metadata for validation.

class sec_interp.core.validation.layer_metadata.LayerMetadata(name: str = '', is_valid: bool = False, kind: str = 'unknown', geometry_type: str | None = None, field_names: list[str] = <factory>, field_types: dict[str, ~sec_interp.core.domain.enums.FieldType]=<factory>, band_count: int = 0, feature_count: int = 0, crs_authid: str | None = None, crs_is_geographic: bool | None = None, extent_xmin: float | None = None, extent_ymin: float | None = None, extent_xmax: float | None = None, extent_ymax: float | None = None, pixel_size_x: float | None = None)

Bases: object

Detached metadata describing a QGIS layer for validation.

Produced by the GUI ValidationExtractor adapter so that the core validators never touch QGIS objects directly.

name

Layer name.

Type:

str

is_valid

Whether the layer was valid at extraction time.

Type:

bool

kind

"vector", "raster", or "unknown".

Type:

str

geometry_type

"point", "line", "polygon", or None.

Type:

str | None

field_names

Ordered list of field names.

Type:

list[str]

field_types

Mapping of field name to FieldType.

Type:

dict[str, sec_interp.core.domain.enums.FieldType]

band_count

Raster band count (0 for vectors).

Type:

int

feature_count

Number of features (0 for rasters).

Type:

int

crs_authid

CRS authority ID (e.g. "EPSG:4326").

Type:

str | None

crs_is_geographic

Whether the declared CRS is geographic, or None.

Type:

bool | None

extent_xmin

Layer extent minimum X (layer CRS units), or None.

Type:

float | None

extent_ymin

Layer extent minimum Y (layer CRS units), or None.

Type:

float | None

extent_xmax

Layer extent maximum X (layer CRS units), or None.

Type:

float | None

extent_ymax

Layer extent maximum Y (layer CRS units), or None.

Type:

float | None

pixel_size_x

Raster pixel size in the raster CRS units, or None.

Type:

float | None

band_count: int = 0
crs_authid: str | None = None
crs_is_geographic: bool | None = None
extent_xmax: float | None = None
extent_xmin: float | None = None
extent_ymax: float | None = None
extent_ymin: float | None = None
feature_count: int = 0
field_names: list[str]
field_types: dict[str, FieldType]
geometry_type: str | None = None
is_valid: bool = False
kind: str = 'unknown'
name: str = ''
pixel_size_x: float | None = None