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 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

how did you manage to install proj4 on windows

@kbevers
Copy link
Member Author

kbevers commented Apr 10, 2017

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

@turyatemba
Copy link

turyatemba commented Apr 11, 2017 via email

@kbevers
Copy link
Member Author

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

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 added a commit that referenced this issue Jun 22, 2017
… is not set correctly on some versions of VS. Fixes #484.
@kbevers kbevers modified the milestones: 5.0.0-b, 5.0.0 Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants