src/projCode/Laea.php
public function init()
    {
        $t = abs($this->lat0);
        if (abs( $t - Common::HALF_PI) < Common::EPSLN) {
            $this->mode = $this->lat0 < 0. ? $this->S_POLE : $this->N_POLE;
        } else if( abs( $t ) < Common::EPSLN ) {
            $this->mode = $this->EQUIT;
        } else {
            $this->mode = $this->OBLIQ;
        }

        if ($this->es > 0) {
            #$sinphi;

            $this->qp = Common::qsfnz( $this->e, 1.0 );
            $this->mmf = 0.5 / (1.0 - $this->es);
            $this->apa = $this->authset( $this->es );
            switch( $this->mode ) {
                case $this->N_POLE:
                case $this->S_POLE:
                    $this->dd = 1.0;
                    break;
                case $this->EQUIT:
                    $this->rq = sqrt( .5 * $this->qp );
                    $this->dd = 1.0 / $this->rq;
                    $this->xmf = 1.0;
                    $this->ymf = 0.5 * $this->qp;
                    break;
                case $this->OBLIQ:
                    $this->rq = sqrt( .5 * $this->qp );
                    $sinphi = sin( $this->lat0 );
                    $this->sinb1 = Common::qsfnz( $this->e, $sinphi ) / $this->qp;
                    $this->cosb1 = sqrt( 1. - $this->sinb1 * $this->sinb1 );
                    $this->dd = cos( $this->lat0 ) / (sqrt( 1.0 - $this->es * $sinphi * $sinphi ) * $this->rq * $this->cosb1);
                    $this->ymf = ($this->xmf = $this->rq) / $this->dd;
                    $this->xmf *= $this->dd;
                    break;
            }
        } else {
            if ($this->mode == $this->OBLIQ) {
                $this->sinph0 = sin($this->lat0);
                $this->cosph0 = cos($this->lat0);
            }
        }
    }
public function init()
    {
        $t = abs($this->lat0);
        if (abs( $t - Common::HALF_PI) < Common::EPSLN) {
            $this->mode = $this->lat0 < 0. ? $this->S_POLE : $this->N_POLE;
        } else if( abs( $t ) < Common::EPSLN ) {
            $this->mode = $this->EQUIT;
        } else {
            $this->mode = $this->OBLIQ;
        }

        if ($this->es > 0) {
            #$sinphi;

            $this->qp = Common::qsfnz( $this->e, 1.0 );
            $this->mmf = 0.5 / (1.0 - $this->es);
            $this->apa = $this->authset( $this->es );
            switch( $this->mode ) {
                case $this->N_POLE:
                case $this->S_POLE:
                    $this->dd = 1.0;
                    break;
                case $this->EQUIT:
                    $this->rq = sqrt( .5 * $this->qp );
                    $this->dd = 1.0 / $this->rq;
                    $this->xmf = 1.0;
                    $this->ymf = 0.5 * $this->qp;
                    break;
                case $this->OBLIQ:
                    $this->rq = sqrt( .5 * $this->qp );
                    $sinphi = sin( $this->lat0 );
                    $this->sinb1 = Common::qsfnz( $this->e, $sinphi ) / $this->qp;
                    $this->cosb1 = sqrt( 1. - $this->sinb1 * $this->sinb1 );
                    $this->dd = cos( $this->lat0 ) / (sqrt( 1.0 - $this->es * $sinphi * $sinphi ) * $this->rq * $this->cosb1);
                    $this->ymf = ($this->xmf = $this->rq) / $this->dd;
                    $this->xmf *= $this->dd;
                    break;
            }
        } else {
            if ($this->mode == $this->OBLIQ) {
                $this->sinph0 = sin($this->lat0);
                $this->cosph0 = cos($this->lat0);
            }
        }
    }
public function init ( ) { $ t = abs ( $ this -> lat0 ) ; if ( abs ( $ t - Common :: HALF_PI ) < Common :: EPSLN ) { $ this -> mode = $ this -> lat0 < 0. ? $ this -> S_POLE : $ this -> N_POLE ; } else if ( abs ( $ t ) < Common :: EPSLN ) { $ this -> mode = $ this -> EQUIT ; } else { $ this -> mode = $ this -> OBLIQ ; } if ( $ this -> es > 0 ) { #$sinphi; $ this -> qp = Common :: qsfnz ( $ this -> e , 1.0 ) ; $ this -> mmf = 0.5 / ( 1.0 - $ this -> es ) ; $ this -> apa = $ this -> authset ( $ this -> es ) ; switch ( $ this -> mode ) { case $ this -> N_POLE : case $ this -> S_POLE : $ this -> dd = 1.0 ; break ; case $ this -> EQUIT : $ this -> rq = sqrt ( .5 * $ this -> qp ) ; $ this -> dd = 1.0 / $ this -> rq ; $ this -> xmf = 1.0 ; $ this -> ymf = 0.5 * $ this -> qp ; break ; case $ this -> OBLIQ : $ this -> rq = sqrt ( .5 * $ this -> qp ) ; $ sinphi = sin ( $ this -> lat0 ) ; $ this -> sinb1 = Common :: qsfnz ( $ this -> e , $ sinphi ) / $ this -> qp ; $ this -> cosb1 = sqrt ( 1. - $ this -> sinb1 * $ this -> sinb1 ) ; $ this -> dd = cos ( $ this -> lat0 ) / ( sqrt ( 1.0 - $ this -> es * $ sinphi * $ sinphi ) * $ this -> rq * $ this -> cosb1 ) ; $ this -> ymf = ( $ this -> xmf = $ this -> rq ) / $ this -> dd ; $ this -> xmf *= $ this -> dd ; break ; } } else { if ( $ this -> mode == $ this -> OBLIQ ) { $ this -> sinph0 = sin ( $ this -> lat0 ) ; $ this -> cosph0 = cos ( $ this -> lat0 ) ; } } }
Initialize the Lambert Azimuthal Equal Area projection
Initialize the Lambert Azimuthal Equal Area projection