Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Transformer and EPSG 10212 #1472

Open
romaintha opened this issue Jan 30, 2025 · 1 comment
Open

Issue with Transformer and EPSG 10212 #1472

romaintha opened this issue Jan 30, 2025 · 1 comment
Labels

Comments

@romaintha
Copy link

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 romaintha added the bug label Jan 30, 2025
@snowman2
Copy link
Member

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

@snowman2 snowman2 added question and removed bug labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants