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

omerc: catch invalid value of gamma (when specified without alpha) #3750

Merged
merged 1 commit into from
Jun 25, 2023

Conversation

rouault
Copy link
Member

@rouault rouault commented Jun 17, 2023

Fixes #3749

From the maths of the computation of alpha from gamma, there is a limitation where the maximum (absolute) value of gamma should be roughly less than 90° - |lat_0|

New error message:

$ bin/proj -I +proj=omerc +lat_0=10  +lonc=10 +gamma=81
proj_create: Error 1027 (Invalid value for an argument): omerc: Invalid value for gamma: given lat_0 value, |gamma| should be <= 80.031869°
Rel. 9.3.0, September 1st, 2023
<proj>:
projection initialization failure
cause: Invalid value for an argument
program abnormally terminated

Fixes OSGeo#3749

From the maths of the computation of alpha from gamma, there is a
limitation where the maximum (absolute) value of gamma should be roughly
less than 90° - |lat_0|

New error message:
```
$ bin/proj -I +proj=omerc +lat_0=10  +lonc=10 +gamma=81
proj_create: Error 1027 (Invalid value for an argument): omerc: Invalid value for gamma: given lat_0 value, |gamma| should be <= 80.031869°
Rel. 9.3.0, September 1st, 2023
<proj>:
projection initialization failure
cause: Invalid value for an argument
program abnormally terminated
```
@rouault rouault merged commit fbe4a45 into OSGeo:master Jun 25, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Omerc +gamma: Point outside projected domain
1 participant