/// <summary> /// This exists in the case that we ever develop code to perform the special proj4 calculations /// </summary> /// <param name="lp"></param> /// <param name="p"></param> /// <param name="fac"></param> protected override void OnSpecial(double[] lp, ProjectionInfo p, Factors fac) { double sinphi = Math.Sin(lp[PHI]); double cosphi = Math.Cos(lp[PHI]); fac.Code = fac.Code | AnalyticModes.IsAnalHk; fac.H = 1; fac.K = _n * (_c - (IsElliptical ? Proj.Mlfn(lp[PHI], sinphi, cosphi, _en) : lp[PHI])) / Proj.Msfn(sinphi, cosphi, Es); }
/// <summary> /// Special factor calculations for a factors calculation /// </summary> /// <param name="lp">lambda-phi</param> /// <param name="p">The projection</param> /// <param name="fac">The Factors</param> protected override void OnSpecial(double[] lp, ProjectionInfo p, Factors fac) { if (Math.Abs(Math.Abs(lp[PHI]) - HALF_PI) < EPS10) { if ((lp[PHI] * _n) <= 0) return; _rho = 0; } else { _rho = _c * (_ellipse ? Math.Pow(Proj.Tsfn(lp[PHI], Math.Sin(lp[PHI]), p.GeographicInfo.Datum.Spheroid.Eccentricity()), _n) : Math.Pow(Math.Tan(Math.PI / 4 + .5 * lp[PHI]), -_n)); } fac.Code = AnalyticModes.IsAnalHk | AnalyticModes.IsAnalConv; fac.K = fac.H = p.ScaleFactor * _n * _rho / Proj.Msfn(Math.Sin(lp[PHI]), Math.Cos(lp[PHI]), p.GeographicInfo.Datum.Spheroid.EccentricitySquared()); fac.Conv = -_n * lp[LAMBDA]; }
/// <summary> /// Allows for some custom code during a process method /// </summary> /// <param name="lp">lambda-phi</param> /// <param name="p">The projection coordinate system information</param> /// <param name="fac">The Factors</param> protected virtual void OnSpecial(double[] lp, ProjectionInfo p, Factors fac) { // some projections support this as part of a process routine, // this will not affect forward or inverse transforms }
/// <summary> /// Special factor calculations for a factors calculation /// </summary> /// <param name="lp">lambda-phi</param> /// <param name="p">The projection</param> /// <param name="fac">The Factors</param> public void Special(double[] lp, ProjectionInfo p, Factors fac) { OnSpecial(lp, p, fac); }