vyperdatum.pipeline

Attributes

logger

Classes

Pipeline

Requirements:

Functions

nwld_ITRF2020_steps(h0, v0, h1, v1)

Generate a general sequence of transformation steps from

nwld_NAD832011_steps(h0, v0, h1, v1)

Generate a general sequence of transformation steps from

Module Contents

vyperdatum.pipeline.logger
class vyperdatum.pipeline.Pipeline(crs_from: pyproj.CRS | int | str, crs_to: pyproj.CRS | int | str, filters: list[str] | None = None)

Requirements: source and target CRS must have explicit code in database (not any custom-built compound CRS will work).

Assumes: Both source and target crs’s horizontal crs are 3d (note the .to_3d() transforms)

filters
WEIGHT = 1
crs_from
crs_to
static split_crs(crs: pyproj.CRS) tuple[str, str | None]

Return CRS string representation in form of code:authority

Raises:

ValueError: – If vertical-only CRS is received.

Returns:

crs components in form of code:authority

Return type:

tuple

static join_crs(h_crs: str, v_crs: str) str

Return CRS string representation in form of code:authority

Raises:

ValueError: – If horizontal CRS is None; or when the CRS is invalid.

Returns:

Concatenate the horizontal and vertical (if exists) CRS components using a + sign.

Return type:

str

linear_steps() list[str] | None

Return a list of CRSs representing the transformation steps from crs_from to crs_to. If the generated pipeline can’t be validated by PROJ, return None.

build_graph()

Construct a graph model of the transformers defined in the proj.db.

add_extensions()

Add known valid transformation edges that are not explicitly listed in the database. Remove some of the known incorrect transformers in the database.

add_node(new_node: str)
k_graph_steps(k, weight='weight')

Return k shortest (optimal) transformation steps between the source and target CRSs, ordered by weight.

graph_steps(weight='weight') list[str] | None

Return the optimal (shortest path) transformation steps between the source and target CRSs, measured by weight.

transformation_steps(method: str = 'linear') list[str] | None

Return transformation steps the source and target CRSs using an algorithm specified by method.

Parameters:

method (str, default 'linear') – An algorithm using which the transformation steps are generated. Possible values: ‘linear’, ‘graph’

vyperdatum.pipeline.nwld_ITRF2020_steps(h0: str, v0: str | None, h1: str, v1: str | None)

Generate a general sequence of transformation steps from h0+v0 (crs_from) to h1+v1 (crs_to).

vyperdatum.pipeline.nwld_NAD832011_steps(h0: str, v0: str | None, h1: str, v1: str | None)

Generate a general sequence of transformation steps from h0+v0 (crs_from) to h1+v1 (crs_to), assuming that v0 is compatible with NAD83 2011 (EPSG:6318).