public override PJ Init() { double t=Math.Abs(phi0); if(Math.Abs(t-Proj.HALFPI)<EPS10) mode=phi0<0.0?laea_mode.S_POLE:laea_mode.N_POLE; else if(Math.Abs(t)<EPS10) mode=laea_mode.EQUIT; else mode=laea_mode.OBLIQ; if(es!=0) { e=Math.Sqrt(es); qp=Proj.pj_qsfn(1.0, e, one_es); mmf=0.5/(1.0-es); apa=Proj.pj_authset(es); switch(mode) { case laea_mode.N_POLE: case laea_mode.S_POLE: dd=1.0; break; case laea_mode.EQUIT: rq=Math.Sqrt(0.5*qp); dd=1.0/rq; xmf=1.0; ymf=0.5*qp; break; case laea_mode.OBLIQ: rq=Math.Sqrt(0.5*qp); double sinphi=Math.Sin(phi0); sinb1=Proj.pj_qsfn(sinphi, e, one_es)/qp; cosb1=Math.Sqrt(1.0-sinb1*sinb1); dd=Math.Cos(phi0)/(Math.Sqrt(1.0-es*sinphi*sinphi)*rq*cosb1); xmf=rq; ymf=xmf/dd; xmf*=dd; break; } inv=e_inverse; fwd=e_forward; } else { if(mode==laea_mode.OBLIQ) { sinb1=Math.Sin(phi0); cosb1=Math.Cos(phi0); } inv=s_inverse; fwd=s_forward; } return this; }
public override PJ Init() { double t = Math.Abs(phi0); if (Math.Abs(t - Proj.HALFPI) < EPS10) { mode = phi0 < 0.0?laea_mode.S_POLE:laea_mode.N_POLE; } else if (Math.Abs(t) < EPS10) { mode = laea_mode.EQUIT; } else { mode = laea_mode.OBLIQ; } if (es != 0) { e = Math.Sqrt(es); qp = Proj.pj_qsfn(1.0, e, one_es); mmf = 0.5 / (1.0 - es); apa = Proj.pj_authset(es); switch (mode) { case laea_mode.N_POLE: case laea_mode.S_POLE: dd = 1.0; break; case laea_mode.EQUIT: rq = Math.Sqrt(0.5 * qp); dd = 1.0 / rq; xmf = 1.0; ymf = 0.5 * qp; break; case laea_mode.OBLIQ: rq = Math.Sqrt(0.5 * qp); double sinphi = Math.Sin(phi0); sinb1 = Proj.pj_qsfn(sinphi, e, one_es) / qp; cosb1 = Math.Sqrt(1.0 - sinb1 * sinb1); dd = Math.Cos(phi0) / (Math.Sqrt(1.0 - es * sinphi * sinphi) * rq * cosb1); xmf = rq; ymf = xmf / dd; xmf *= dd; break; } inv = e_inverse; fwd = e_forward; } else { if (mode == laea_mode.OBLIQ) { sinb1 = Math.Sin(phi0); cosb1 = Math.Cos(phi0); } inv = s_inverse; fwd = s_forward; } return(this); }