I have the following proj4 projection string defining an Oblique Mercator projection :
+proj=omerc +lat_0=45 +lonc=-80 +x_0=0 +y_0=0 +alpha=45 +gamma=0 +k_0=1
For my input coordinate, I was using 0, 0. When I alter the alpha angle from 45 to the range 90 to 270 inclusive, the projected point changes from the expected 80W, 45N to a point that proceeds easterly around the earth at the same latitude until the alpha is > 270, where I then get expected results again.
invproj +proj=omerc +lat_0=45 +lonc=-80 +x_0=0 +y_0=0 +alpha=45 +gamma=0 +k_0=1
0 0
80dW 45dN (this is expected)
invproj +proj=omerc +lat_0=45 +lonc=-80 +x_0=0 +y_0=0 +alpha=89 +gamma=0 +k_0=1
0 0
80dW 45dN (this is expected)
invproj +proj=omerc +lat_0=45 +lonc=-80 +x_0=0 +y_0=0 +alpha=91 +gamma=0 +k_0=1
0 0
77d10'18.699"W 45dN (this is not expected)
I'm not sure why I should be getting these different results, as a workaround, I could reverse the angle from 91 to 271, but I think I might need to also reverse the u, v in the projected system, it would be nice if Proj4 did this.
Edit: I've created an issue at Github for this at : https://github.com/OSGeo/proj.4/issues/331
It looks like there was a regression between Proj4 versions 4.7 and 4.8 that introduced a bug for this scenario, I found the following in the mailing list archives:
http://lists.maptools.org/pipermail/proj/2012-June/006331.html
Mikael Rittri wrote :
Not what I would expect. As far as I can understand, these weird results appear when alpha is southish (in the closed interval 90 to 270). The omerc of Proj 4.7.0 did not behave this way.
This coincides with my observations. My solution was to reverse the alpha and add a pre/post processing layer that inverses the sign of the easting and northing values.