sec_interp.core.validation.crs_plausibility module
Best-effort detection of mislabelled CRS from layer extent plausibility.
A wrong CRS label cannot be read from metadata (QGIS trusts the declaration), but it is often visible in the coordinate values. These rules are intentionally conservative: they only fire when the declared CRS is contradicted by an extent (or raster pixel size) that could not plausibly belong to it.
- sec_interp.core.validation.crs_plausibility.configured_layer_metadata(params: ValidationParams) list[LayerMetadata]
Return the detached metadata of every configured layer.
- sec_interp.core.validation.crs_plausibility.implausible_crs_reason(metadata: LayerMetadata | None) str
Return a human-readable reason if the CRS looks mislabelled, else
"".- Parameters:
metadata – Detached layer metadata (extent populated by the GUI extractor).
- Returns:
A message describing the mismatch, or an empty string when the CRS is plausible or cannot be judged.