-
Notifications
You must be signed in to change notification settings - Fork 865
Improve affine.rst: document unit behavior, limitations, and examples (#3902) #4630
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
base: master
Are you sure you want to change the base?
Conversation
rouault
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly suspect you have used some LLM/AI tool to generate that. There's a lot of uselessly verbose and inaccurate statements.
| When :code:`+proj=affine` is used on angular coordinates (longitude/latitude): | ||
|
|
||
| * **Input angular values are interpreted in radians** | ||
| * **Output angular values are expressed in degrees** | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not true. affine is not unit aware at all.
The unit conversion is done here by cs2cs and we could argue this is a bug of cs2cs to accept +proj=affine. Normal manual usage of +proj=affine should be done with the cct utility
| Example of valid usage inside a pipeline: | ||
|
|
||
| proj pipeline +step +proj=affine +xoff=1 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the proj utility isn't appropriate to execute pipelines. That should be done with cct
| **3. Recommended usage** | ||
|
|
||
| The affine transformation is generally intended for: | ||
|
|
||
| * Modifying projected coordinates | ||
| * Applying small adjustments inside pipelines | ||
| * Implementing EPSG parametric and similarity transforms | ||
|
|
||
| When applied to geographic coordinates, users must explicitly handle/unit-convert | ||
| angles as needed. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not useful
|
Thank you for the clarification, and apologies for the inaccuracies. |
This PR addresses issue #3902 by expanding the documentation for +proj=affine.
Summary of changes
proj +proj=affinecannot be used directly and will raise an error.Checklist