dataclass.specialTables

Schema validation and parsing helpers for domain-specific TableData inputs.

Classes

class dataclass.specialTables.PolyLinesTable

Helpers for poly-line vertex tables (InputPolyLines).

Required columns: name, x_coordinate, y_coordinate. Optional columns: z_coordinate, bore_number.

Whether z_coordinate must be validated is decided by each module.

Methods:

require_columns(cls, table: TableData) None
has_z_coordinate(cls, table: PolyLineTableLike) bool
require_z_coordinate_if_used(cls, table: PolyLineTableLike) None

Validate z_coordinate only when the column is used.

require_not_empty(table: TableData) None
define_mode(cls, table: TableData) Literal[bores, points]
parse(cls, table: TableData) tuple[dict[str, list[tuple[float, float]]], dict[str, list[str | None]] | None]

Extract multi-line XY vertices grouped by line name.

section_lines_from_bores(line_bore_numbers: dict[str, list[str | None]]) dict[str, list[str]]

Attributes:

NAME = GeneralProps.Name
X = GeneralProps.XCoordinate
Y = GeneralProps.YCoordinate
Z = GeneralProps.ZCoordinate
BORE = GeoResults.BoreNumber
REQUIRED_COLUMNS = <ast.Tuple object at 0x0000028E222E4520>
class dataclass.specialTables.TerrainLinesTable

Helpers for sliced terrain-line tables (``InputTerrainLines``).

Methods:

require_slice_columns(cls, table: TableData) None
validate_xy_alignment(cls, poly_lines: TableData, terrain_lines: TableData) None

Check slice-point XY vertices match poly-line vertices per line name.

Attributes:

NAME = GeneralProps.Name
X = GeneralProps.XCoordinate
Y = GeneralProps.YCoordinate
SLICE_POINT = 'slice_point'
SLICE_COLUMNS = <ast.Tuple object at 0x0000028E21725060>

Functions

dataclass.specialTables.require_columns(table: TableData, columns: tuple[str, Ellipsis]) None