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?
to your account
Specifying a flattening of zero was OK in proj 4.9.3. In proj 5.0.0 and above, it produces an error. I checked this using the Lambert Conformal Conic and Stereographic projections.
Here are two command line examples:
proj +proj=stere +ellps=WGS84 +f=0.0 +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378470.0 +no_defs
proj +proj=lcc +ellps=sphere +f=0.0 +lon_0=-107.0 +lat_0=50.0 +lat_1=50.0 +lat_2=50.0 +x_0=5632642.22547 +y_0=4612545.65137 +a=6378470.0 +no_defs
The choice of ellipse doesn't matter. If you try these with 4.9.3, you get success and correct results. If you try them with 5.0.0 or better, you get the result:
projection initialization failure
cause: argument not numerical or out of range
program abnormally terminated
I also found that I get correct results on 5.0.0 and better if I specify a vanishingly small flattening, +f=1.0e-200 for example.
I've tried this on Mac OSX 10.13.6 and RedHat Enterprise Linux 7 using proj installations via conda from conda-forge.
The text was updated successfully, but these errors were encountered:
Allow ellipsoid flattening to be set to zero
Issue raised in OSGeo#1191.
Fixed in #1192
For a workaround instead of specifying +a=6378470.0 +f=0.0 you can just do +R=6378470.0 to use a sphere instead of forcing it by tweaking ellipsoid parameters. Also, remove the +ellps=WGS84 it is ignored when +a, +f or +R is set.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.