pyproj icon indicating copy to clipboard operation
pyproj copied to clipboard

Issue with Transformer and EPSG 10212

Open romaintha opened this issue 10 months ago • 1 comments

from pyproj.transformer import Transformer, CRS, TransformerGroup

point = [1.68483801e+05, 1.83992731e+05, 9.32285000e+01]

transformer_group = TransformerGroup(CRS('EPSG:10212+5701').to_3d(), CRS(4978).to_3d())
print(transformer_group)
<TransformerGroup: best_available=False>
- transformers: 1
- unavailable_operations: 2

transformer_group.transformers[0].transform(*point)
(3968776.331393765, -184062.38931213014, 4972935.793099421)

transformer = Transformer.from_crs(CRS("EPSG:10212+5701").to_3d(), CRS(4978).to_3d())
transformer.transform(*point)
(3968807.3131983005, -184063.8261744, 4972974.875389354)

Problem description

Hi, I'm facing something unexpected. Here is a transformer instantiated in 2 different ways:

  • using Transformer.from_crs
  • using TransformerGroup, and then picking up the first and only transformer from the group

I'm confused that these 2 transformers give a different transformation ? Is that expected? Am I missing something here?

Environment Information

pyproj info: pyproj: 3.7.0 PROJ (runtime): 9.4.1 PROJ (compiled): 9.4.1 data dir: /home/romain/.virtualenvs/test/lib/python3.10/site-packages/pyproj/proj_dir/share/proj user_data_dir: /home/romain/.local/share/proj PROJ DATA (recommended version): 1.18 PROJ Database: 1.3 EPSG Database: v11.006 [2024-03-13] ESRI Database: ArcGIS Pro 3.3 [2024-05-07] IGNF Database: 3.1.0 [2019-05-24]

System: python: 3.10.12 (main, Jan 17 2025, 14:35:34) [GCC 11.4.0] executable: /home/romain/.virtualenvs/test/bin/python machine: Linux-6.11.0-108013-tuxedo-x86_64-with-glibc2.35

Python deps: certifi: 2024.12.14 Cython: 3.0.11 setuptools: 75.6.0 pip: 24.3.1

Installation method

installed with pip and then run pyproj sync --all

romaintha avatar Jan 30 '25 11:01 romaintha

The Transformer created using from_crs uses complex logic to figure out the transformation: https://proj.org/en/stable/operations/operations_computation.html

snowman2 avatar Jan 30 '25 21:01 snowman2