vyperdatum.pipeline
Attributes
Classes
Requirements: |
Functions
|
Generate a general sequence of transformation steps from |
|
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:
- 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:
- 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.
- 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’