-
Notifications
You must be signed in to change notification settings - Fork 217
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
Bug in Transformer class when using a BoundCRS object (incorrect results) #1467
Comments
The target CRS must be geographic. In your case |
Hi, Sorry for my late response. I understand that the datum transformation is defined between geographic CRS, in this case, EPSG:4230 and EPSG:4326. However, I believe it should be possible to create a Regardless, The BoundCRS class is a powerful and great class, allowing users to easily tie CRSs and transformations together. It would be a significant improvement if it could exhibit similar behavior to |
@phaarnes those are interesting suggestions.
I hesitate to do something like that. That could cause confusion for users learning about building CRS. Maybe throw an an error, as you suggested, that would tell users to pass in a geographic CRS. |
Yes, I got your point on that one. Personally, I would prefer that the
Furthermore, I believe it should throw an error and not produce any results if there is an issue with the user input. It should not automatically select the best available transformation without informing the user. This makes me somewhat reluctant to use this class, as I feel I cannot fully trust that it is actually using the transformation I provided. |
Example Code showing the issue where the transformation part of the BoundCRS object is ignored
Problem description
When the target CRS of a
BoundCRS
object is a Projected CRS, theTransformer
class ignores the transformations provided in the BoundCRS. It just picks the "best available" transformation as when you run for example:However, when if the target CRS is a geographic CRS, the transformation part of the BoundCRS object is used. Here is a example code showing correct results if target CRS is geographic:
Expected Output
Environment Information
pyproj 3.6.1
python 3.11.10
Installation method
pip wheel
The text was updated successfully, but these errors were encountered: