diff --git a/docs/history.rst b/docs/history.rst index b8510b09e..f6251ad0a 100644 --- a/docs/history.rst +++ b/docs/history.rst @@ -4,6 +4,7 @@ Change Log Latest ------- - DEP: Minimum PROJ version 8.1 (issue #1011) +- BUG: Fix transformer list for 3D transformations in :class:`pyproj.transformer.TransformerGroup` (discussion #1072) 3.3.1 ------- diff --git a/pyproj/_transformer.pyx b/pyproj/_transformer.pyx index fee5c4f84..0ff6842f7 100644 --- a/pyproj/_transformer.pyx +++ b/pyproj/_transformer.pyx @@ -172,8 +172,8 @@ cdef class _TransformerGroup: ) pj_operations = proj_create_operations( self.context, - get_transform_crs(crs_from).projobj, - get_transform_crs(crs_to).projobj, + crs_from.projobj, + crs_to.projobj, operation_factory_context, ) num_operations = proj_list_get_count(pj_operations) @@ -216,16 +216,6 @@ cdef class _TransformerGroup: ProjError.clear() -cdef _CRS get_transform_crs(_CRS in_crs): - for sub_crs in in_crs.sub_crs_list: - if ( - not sub_crs.type_name.startswith("Temporal") and - not sub_crs.type_name.startswith("Temporal") - ): - return sub_crs.source_crs if sub_crs.is_bound else sub_crs - return in_crs.source_crs if in_crs.is_bound else in_crs - - cdef PJ* proj_create_crs_to_crs( PJ_CONTEXT *ctx, const char *source_crs_str, diff --git a/test/test_transformer.py b/test/test_transformer.py index 87acfae05..d2265e6bb 100644 --- a/test/test_transformer.py +++ b/test/test_transformer.py @@ -709,7 +709,7 @@ def test_transformer_group__get_transform_crs(): if not grids_available("nl_nsgi_rdtrans2018.tif"): assert len(tg.transformers) == 1 else: - assert len(tg.transformers) == 2 + assert len(tg.transformers) == 6 @pytest.mark.grid