public override void Initialize() { base.Initialize(); double t = TrueScaleLatitude; ScaleFactor = Math.Cos(t); if (EccentricitySquared != 0) { t = Math.Sin(t); ScaleFactor /= Math.Sqrt(1.0 - EccentricitySquared * t * t); _apa = ProjectionMath.AuthSet(EccentricitySquared); _qp = ProjectionMath.Qsfn(1.0, Eccentricity, _oneEs); } }
public override void Initialize() { base.Initialize(); if (Spherical) { if (_mode == AzimuthalMode.Oblique) { _sinphi0 = Math.Sin(ProjectionLatitude); _cosphi0 = Math.Cos(ProjectionLatitude); } } else { double sinphi; _qp = ProjectionMath.Qsfn(1.0, Eccentricity, _oneEs); _mmf = .5 / (1.0 - EccentricitySquared); _apa = ProjectionMath.AuthSet(EccentricitySquared); switch (_mode) { case AzimuthalMode.NorthPole: case AzimuthalMode.SouthPole: _dd = 1.0; break; case AzimuthalMode.Equator: _dd = 1.0 / (_rq = Math.Sqrt(.5 * _qp)); _xmf = 1.0; _ymf = .5 * _qp; break; case AzimuthalMode.Oblique: _rq = Math.Sqrt(.5 * _qp); sinphi = Math.Sin(ProjectionLatitude); _sinb1 = ProjectionMath.Qsfn(sinphi, Eccentricity, _oneEs) / _qp; _cosb1 = Math.Sqrt(1.0 - _sinb1 * _sinb1); _dd = Math.Cos(ProjectionLatitude) / (Math.Sqrt(1.0 - EccentricitySquared * sinphi * sinphi) * _rq * _cosb1); _ymf = (_xmf = _rq) / _dd; _xmf *= _dd; break; } } }
public override void Initialize() { base.Initialize(); double t; phi0 = _projectionLatitude; if (Math.Abs((t = Math.Abs(phi0)) - ProjectionMath.PiHalf) < ProjectionMath.EPS10) { mode = phi0 < 0.0 ? AzimuthalMode.SouthPole : AzimuthalMode.NorthPole; } else if (Math.Abs(t) < ProjectionMath.EPS10) { mode = AzimuthalMode.Equator; } else { mode = AzimuthalMode.Oblique; } if (!_spherical) { double sinphi; _e = Math.Sqrt(_es); qp = ProjectionMath.Qsfn(1.0, _e, _oneEs); mmf = 0.5 / (1.0 - _es); apa = ProjectionMath.AuthSet(_es); switch (mode) { case AzimuthalMode.NorthPole: case AzimuthalMode.SouthPole: dd = 1.0; break; case AzimuthalMode.Equator: dd = 1.0 / (rq = Math.Sqrt(.5 * qp)); xmf = 1.0; ymf = .5 * qp; break; case AzimuthalMode.Oblique: rq = Math.Sqrt(.5 * qp); sinphi = Math.Sin(phi0); sinb1 = ProjectionMath.Qsfn(sinphi, _e, _oneEs) / qp; cosb1 = Math.Sqrt(1.0 - sinb1 * sinb1); dd = Math.Cos(phi0) / (Math.Sqrt(1.0 - _es * sinphi * sinphi) * rq * cosb1); ymf = (xmf = rq) / dd; xmf *= dd; break; } } else { if (mode == AzimuthalMode.Oblique) { sinph0 = Math.Sin(phi0); cosph0 = Math.Cos(phi0); } } }