Hello all

About the new formulas for the Mercator and Lambert Conic Conformal
projections, we did some benchmarks in the 'MercatorMethodComparison'
test class:

  * The series expansion published by EPSG is 2 time faster than the
    iterative approach that we used before.
  * Rewriting the series expansion using trigonometric identities for
    reducing the amount of calls to Math.sin/cos increases the speed by
    another factor of 2.

The precision of the EPSG formulas is same or better than our iterative
method for a planet like Earth having an excentricity of 0.082. We found
empirically that we start loosing centimetric precision with EPSG
formulas for an excentricity of 0.16 or greater. So in order to have
both speed improvement while retaining precision, we implemented an
hybrid approach for the Mercator and Lambert Conic Conformal projections:

  * First use the series expansion as published by EPSG.
  * Only if the planet excentricity is equals or greater than 0.16,
    continue with the iterative approach for refining the above result.
    It should never happen on Earth, but may happen if someone uses SIS
    for another planet.

One more note on accuracy: the equations used by the Mercator and
Lambert projections are slightly more accurate in one hemisphere than in
the other, because of the way IEEE 754 arithmetic works. The equations
in the EPSG guide favorise the North hemisphere, and that advantage
given to the North hemisphere is hard-coded in many libraries. In Apache
SIS, the advantage is given to the hemisphere of the latitude of origin.
So creating a Mercator projection with a "latitude of origin" of +0° or
-0° is not exactly the same, because the sign of the 0° determines which
hemisphere (north or south) will be more accurate. Internally, this is
done by adjusting the sign of some strategic coefficients, so there is
no performance cost. The accuracy difference is very small however.


We started to implement the "Transverse Mercator" projection. Again,
this projection has new formulas documented in the EPSG guide which are
quite different than the one we had in the Geotk project. Those new
formulas are more accurate over a wider range of longitude around the
central meridian. We already implemented those new formulas in the
TransverseMercator class on the JDK8 branch. What we still need to do:

  * Do the analytic derivation of those formulas and implement them.
  * Use trigonometric identities for reducing the amount of calls to
    Math.cos/sin, as we did for the other projections above.

What I would like to do before to propose a release candidate:

  * Port 1 or 2 more map projections, if time allows (i.e. if it does
    not delay the release candidate too much).
  * Add the missing JAXB annotations in DefaultProjectedCRS,
    DefaultDerivedCRS and DefaultEngineeringCRS.
  * Maybe make the default WKT 2 formatting closer to the style
    suggested by ISO 19162.

Comments are welcome,

    Martin


Reply via email to