vyperdatum.pipeline =================== .. py:module:: vyperdatum.pipeline Attributes ---------- .. autoapisummary:: vyperdatum.pipeline.logger Classes ------- .. autoapisummary:: vyperdatum.pipeline.Pipeline Functions --------- .. autoapisummary:: vyperdatum.pipeline.nwld_ITRF2020_steps vyperdatum.pipeline.nwld_NAD832011_steps Module Contents --------------- .. py:data:: logger .. py:class:: Pipeline(crs_from: Union[pyproj.CRS, int, str], crs_to: Union[pyproj.CRS, int, str], filters: Optional[list[str]] = 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) .. py:attribute:: filters .. py:attribute:: WEIGHT :value: 1 .. py:attribute:: crs_from .. py:attribute:: crs_to .. py:method:: split_crs(crs: pyproj.CRS) -> tuple[str, Optional[str]] :staticmethod: 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 :rtype: tuple .. py:method:: join_crs(h_crs: str, v_crs: str) -> str :staticmethod: 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. :rtype: str .. py:method:: linear_steps() -> Optional[list[str]] 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`. .. py:method:: build_graph() Construct a graph model of the transformers defined in the proj.db. .. py:method:: 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. .. py:method:: add_node(new_node: str) .. py:method:: k_graph_steps(k, weight='weight') Return `k` shortest (optimal) transformation steps between the source and target CRSs, ordered by `weight`. .. py:method:: graph_steps(weight='weight') -> Optional[list[str]] Return the optimal (shortest path) transformation steps between the source and target CRSs, measured by `weight`. .. py:method:: transformation_steps(method: str = 'linear') -> Optional[list[str]] Return transformation steps the source and target CRSs using an algorithm specified by `method`. :param method: An algorithm using which the transformation steps are generated. Possible values: 'linear', 'graph' :type method: str, default 'linear' .. py:function:: nwld_ITRF2020_steps(h0: str, v0: Optional[str], h1: str, v1: Optional[str]) Generate a general sequence of transformation steps from h0+v0 (crs_from) to h1+v1 (crs_to). .. py:function:: nwld_NAD832011_steps(h0: str, v0: Optional[str], h1: str, v1: Optional[str]) 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).