[Proj] Breaking change for +proj=omerc +no_rot in Proj version 4.8

Mikael Rittri Mikael.Rittri at carmenta.com
Wed Feb 6 11:17:32 EST 2013


Hello,

The Malayan Monster is back!

I know that in Proj version 4.8, the implementation of Hotine Oblique Mercator was replaced
by the version from libproj4. And I know one of the compatibility issues: the +rot_conv flag
is gone and replaced by the more general +gamma parameter.

But the behaviour of the "no_rot" flag also seems to have changed. (We happened to use it
internally.)

Here is an example in Proj 4.7:

proj +proj=omerc +a=6377298.556 +f=0.00332444929666288 +lonc=115 +lat_0=4 +alpha=53.3158204722222 +no_rot +x_0=0 +y_0=0 +k_0=0.99984 +no_defs -v
#Oblique Mercator
#       Cyl, Sph&Ell
#        no_rot rot_conv no_uoff and
#       alpha= lonc= or
#        lon_1= lat_1= lon_2= lat_2=
# +proj=omerc +a=6377298.556 +f=0.00332444929666288 +lonc=115 +lat_0=4
# +alpha=53.3158204722222 +no_rot +x_0=0 +y_0=0 +k_0=0.99984 +no_defs
115d48'19.8196"E 5d23'14.1129"N
163238.16       -69702.79

Using the same definition in Proj 4.8 gives

proj +proj=omerc +a=6377298.556 +f=0.00332444929666288 +lonc=115 +lat_0=4 +alpha=53.3158204722222 +no_rot +x_0=0 +y_0=0 +k_0=0.99984 +no_defs -v
#Oblique Mercator
#       Cyl, Sph&Ell no_rot
#       alpha= [gamma=] [no_off] lonc= or
#        lon_1= lat_1= lon_2= lat_2=
# +proj=omerc +a=6377298.556 +f=0.00332444929666288 +lonc=115 +lat_0=4
# +alpha=53.3158204722222 +x_0=0 +y_0=0 +k_0=0.99984 +no_defs
#--- following specified but NOT used
# +no_rot
115d48'19.8196"E 5d23'14.1129"N
901334.26       -69702.79

The second coordinate is the same, but the first is quite different.
And the verbose output says that +no_rot is not used.
But that's a lie: if we remove +no_rot in 4.8, we get

proj +proj=omerc +a=6377298.556 +f=0.00332444929666288 +lonc=115 +lat_0=4 +alpha=53.3158204722222 +x_0=0 +y_0=0 +k_0=0.99984 +no_defs -v
#Oblique Mercator
#       Cyl, Sph&Ell no_rot
#       alpha= [gamma=] [no_off] lonc= or
#        lon_1= lat_1= lon_2= lat_2=
# +proj=omerc +a=6377298.556 +f=0.00332444929666288 +lonc=115 +lat_0=4
# +alpha=53.3158204722222 +x_0=0 +y_0=0 +k_0=0.99984 +no_defs
115d48'19.8196"E 5d23'14.1129"N
89266.61        153416.59

So +no_rot does have an effect; the question is just what it does
in 4.8. I figured out that I could nearly reproduce the 4.7 behaviour
by omitting +no_rot and using +gamma=0.0; this gives:

proj +proj=omerc +a=6377298.556 +f=0.00332444929666288 +lonc=115 +lat_0=4 +alpha=53.3158204722222 +gamma=0.0 +x_0=0 +y_0=0 +k_0=0.99984 +no_defs -v
#Oblique Mercator
#       Cyl, Sph&Ell no_rot
#       alpha= [gamma=] [no_off] lonc= or
#        lon_1= lat_1= lon_2= lat_2=
# +proj=omerc +a=6377298.556 +f=0.00332444929666288 +lonc=115 +lat_0=4
# +alpha=53.3158204722222 +gamma=0.0 +x_0=0 +y_0=0 +k_0=0.99984 +no_defs
115d48'19.8196"E 5d23'14.1129"N
-69702.79       163238.16

The result is the same coordinates as in the 4.7 example, but in the opposite order.
Maybe this makes some sense: +no_rot in 4.7 says no rotation, and since we have a general
rotation parameter +gamma in 4.8, it is natural to specify no rotation by setting +gamma=0.0.
And the coordinate order is probably weird in 4.7: the unrotated coordinates are called u and v,
and I believe Martin Hotine defined the u,v coordinate system to be left-handed, so it seems
that Gerald Evenden followed that design in the +no_rot of Proj 4.x (where x <= 7).

My conclusion is that +no_rot is not needed in 4.8, but it does have some effect (not sure what),
despite the denial of the verbose output.

If someone understands more about this, I'd like to hear about it.
Otherwise, you are warned: don't use +no_rot in Proj 4.8.

Best regards,

Mikael Rittri
Carmenta
Sweden
http://www.carmenta.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20130206/2db98a65/attachment.htm 


More information about the Proj mailing list