Example #1
0
 def __init__(self,
              base_transformer: Optional[_Transformer] = None) -> None:
     if not isinstance(base_transformer, _Transformer):
         ProjError.clear()
         raise ProjError("Transformer must be initialized using: "
                         "'from_crs', 'from_pipeline', or 'from_proj'.")
     self._transformer = base_transformer
Example #2
0
    def __init__(
        self,
        transformer_maker: Union[TransformerMaker, None] = None,
    ) -> None:
        if not isinstance(transformer_maker, TransformerMaker):
            ProjError.clear()
            raise ProjError("Transformer must be initialized using: "
                            "'from_crs', 'from_pipeline', or 'from_proj'.")

        self._local = TransformerLocal()
        self._local.transformer = transformer_maker()
        self._transformer_maker = transformer_maker