/** * Transforms the specified (<var>λ</var>,<var>φ</var>) coordinates (units in * radians) and stores the result in {@code ptDst} (linear distance on a unit sphere). */ @Override protected Point2D transformNormalized(double x, double y, Point2D ptDst) throws ProjectionException { if (abs(y) > (PI / 2 - EPSILON)) { throw new ProjectionException(y); } // Compute using ellipsoidal formulas, for comparaison later. assert (ptDst = super.transformNormalized(x, y, ptDst)) != null; y = log(tan(PI / 4 + 0.5 * y)); assert checkTransform(x, y, ptDst); if (ptDst != null) { ptDst.setLocation(x, y); return ptDst; } return new Point2D.Double(x, y); }