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

Very verbose usage of proj (-V) fails on Windows #484

Closed
kbevers opened this issue Jan 31, 2017 · 4 comments
Closed

Very verbose usage of proj (-V) fails on Windows #484

kbevers opened this issue Jan 31, 2017 · 4 comments

Comments

@kbevers
Copy link
Member

@kbevers kbevers commented Jan 31, 2017

When using the -V option with proj on Windows something goes wrong and "Unknown error" is returned. I have only been able to reproduce on Windows. The problem seems to have beeen introduced some time between version 4.9.2 and 4.9.3.

With version 4.9.2:

C:\dev\build\proj4\bin>proj
Rel. 4.9.2, 08 September 2015
usage: proj [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]

C:\dev\build\proj4\bin>echo 10 55 | proj.exe -V +proj=utm +zone=32
#Universal Transverse Mercator (UTM)
#       Cyl, Sph
#       zone= south
# +proj=utm +zone=32 +ellps=WGS84
#Final Earth figure: ellipsoid
#  Major axis (a): 6378137.000
#  1/flattening: 298.257224
#  squared eccentricity: 0.006694379990

Longitude: 10dE [ 10 ]
Latitude:  55dN [ 55 ]
Easting (x):   563967.42
Northing (y):  6095248.71
Meridian scale (h) : 0.99965020  ( -0.03498 % error )
Parallel scale (k) : 0.99965020  ( -0.03498 % error )
Areal scale (s):     0.99930052  ( -0.06995 % error )
Angular distortion (w): 0.000
Meridian/Parallel angle: 90.00000
Convergence : 0d49'9.047" [ 0.81917959 ]
Max-min (Tissot axis a-b) scale error: 0.99965 0.99965

With version 4.9.3:

C:\>proj
Rel. 4.9.3, 15 August 2016
usage: proj [ -bCeEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]

C:\>echo 10 55 | proj -V +proj=utm +zone=32
#Universal Transverse Mercator (UTM)
#       Cyl, Sph
#       zone= south
# +proj=utm +zone=32 +ellps=WGS84
#Final Earth figure: ellipsoid
#  Major axis (a): 6378137.000
#  1/flattening: 298.257224
#  squared eccentricity: 0.006694379990
Rel. 4.9.3, 15 August 2016
<proj.exe>: while processing file: <stdin>, line 1
Unknown error
@kbevers kbevers added this to the 4.9.4 milestone Jan 31, 2017
@kbevers kbevers self-assigned this Jan 31, 2017
@turyatemba
Copy link

@turyatemba turyatemba commented Apr 10, 2017

how did you manage to install proj4 on windows

Loading

@kbevers
Copy link
Member Author

@kbevers kbevers commented Apr 10, 2017

As mentioned here the easiest way is to install it via OSGeo4W

Loading

@turyatemba
Copy link

@turyatemba turyatemba commented Apr 11, 2017

Loading

@kbevers
Copy link
Member Author

@kbevers kbevers commented Jun 21, 2017

Slight update on this:

The problem appears only to exists when building with Visual Studio / nmake.

The problem is located near line 212 in proj.c. It seems as if pj_errno is never initialized to 0 and instead holds an abitratry non-zero value that trips up the if-statement in line 212.

CC @busstoptaktik

Loading

kbevers added a commit to kbevers/PROJ that referenced this issue Jun 22, 2017
… is not set correctly on some versions of VS. Fixes OSGeo#484.
@kbevers kbevers closed this in #528 Jun 22, 2017
kbevers added a commit that referenced this issue Jun 22, 2017
… is not set correctly on some versions of VS. Fixes #484.
@kbevers kbevers removed this from the 5.0.0-b milestone Feb 1, 2018
@kbevers kbevers added this to the 5.0.0 milestone Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants