/// <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);
 }
Пример #2
0
        /// <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>
        protected override void OnSpecial(double[] lp, ProjectionInfo p, Factors fac)
        {
            if (Math.Abs(Math.Abs(lp[Phi]) - HalfPi) < 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];
        }
Пример #4
0
 /// <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);
 }