From 8217aa770c2942a8096b62b5af67ba1d9bdbdbde Mon Sep 17 00:00:00 2001 From: Wouter Date: Wed, 6 Mar 2024 12:45:09 +0100 Subject: [PATCH] exclude compound processing for&to the same compound crs and use the default 'noop' --- src/coordinate_transformation_api/crs_transform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coordinate_transformation_api/crs_transform.py b/src/coordinate_transformation_api/crs_transform.py index 7c036ba..b650b43 100644 --- a/src/coordinate_transformation_api/crs_transform.py +++ b/src/coordinate_transformation_api/crs_transform.py @@ -393,6 +393,7 @@ def my_round(val: float, precision: int | None) -> float | int: # These transformations need to be splitted in a horizontal and vertical transformation. if ( transformer.target_crs is not None + and source_crs != target_crs and transformer.target_crs.type_name == "Compound CRS" and len(transformer.target_crs.sub_crs_list) == COMPOUND_CRS_LENGTH ): @@ -402,7 +403,7 @@ def my_round(val: float, precision: int | None) -> float | int: v_transformer = get_transformer(source_crs, vertical, epoch) def transform_compound_crs(val: CoordinatesType) -> tuple[float, ...]: - # + input = tuple([*val, float(epoch)]) if epoch is not None else tuple([*val]) h = tuple(