[PROJ] About PROJ.6: Radians or Degrees ?

a.furieri at lqt.it a.furieri at lqt.it
Tue Apr 2 00:54:13 PDT 2019


the second glitch I noticed is about some inconsistency
in requiring angular coordinates expressed in Radians
or Degrees.

I always used proj_trans_generic() in SpatiaLite, and
I experienced several strong headaches before guessing
by trial and error what really were the expectations of
PROJ.6 about angular coordinates.
the documentation is very cryptic/incomplete about this
very critical and absolutely relevant detail.
this is what I've discovered after many practical tests:

- if the PJ transformation object has been created by
   proj_create() angular coordinates are expected to be
   passed back and forth converting to/form Radians.
- but (rather surprisingly) if PJ has been create by
   proj_create_crs_to_crs() angular coordinates must
   be passed back and forth directly expressed in
   Degrees; there is no need to convert in Radians.

the real problem is not in this sudden change of
behaviour; it's someway inconsistent and unexpected,
but it's not a big issue once you are well aware
of it.
the real problem is that this absolutely critical
point seems to be completely ignored by the
documentation.
may be that adding a second and third C samples
could be very useful so to clarify any possible
doubt.

bye Sandro


More information about the PROJ mailing list