Пример #1
0
 /**
  * 
  */
 public function init()
 {
     $this->e0 = Common::e0fn($this->es);
     $this->e1 = Common::e1fn($this->es);
     $this->e2 = Common::e2fn($this->es);
     $this->e3 = Common::e3fn($this->es);
     $this->ml0 = $this->a * Common::mlfn($this->e0, $this->e1, $this->e2, $this->e3, $this->lat0);
 }
Пример #2
0
 public function teste0fn()
 {
     $ret = Common::e0fn(0.35363122);
     $this->assertEquals(0.90486650238871, $ret, "", 1.0E-6);
     $ret = Common::e0fn(0.31245122);
     $this->assertEquals(0.91671521990135, $ret, "", 1.0E-6);
     $ret = Common::e0fn(0.1257483412);
     $this->assertEquals(0.96778286074154, $ret, "", 1.0E-6);
 }
Пример #3
0
 /**
  * 
  */
 public function init()
 {
     if (!isset($this->lat0)) {
         // SR-ORG:6696 does not define lat0 param in wkt
         $this->lat0 = 0.0;
     }
     $this->e0 = Common::e0fn($this->es);
     $this->e1 = Common::e1fn($this->es);
     $this->e2 = Common::e2fn($this->es);
     $this->e3 = Common::e3fn($this->es);
     $this->ml0 = $this->a * Common::mlfn($this->e0, $this->e1, $this->e2, $this->e3, $this->lat0);
 }
Пример #4
0
 /**
  *
  * @return void
  */
 public function init()
 {
     if (!isset($this->zone)) {
         Proj4php::reportError("utm:init: zone must be specified for UTM");
         return;
     }
     $this->lat0 = 0.0;
     $this->long0 = (6 * abs($this->zone) - 183) * Common::D2R;
     $this->x0 = 500000.0;
     $this->y0 = $this->utmSouth ? 10000000.0 : 0.0;
     $this->k0 = 0.9996;
     $this->e0 = Common::e0fn($this->es);
     $this->e1 = Common::e1fn($this->es);
     $this->e2 = Common::e2fn($this->es);
     $this->e3 = Common::e3fn($this->es);
     $this->ml0 = $this->a * Common::mlfn($this->e0, $this->e1, $this->e2, $this->e3, $this->lat0);
 }
Пример #5
0
 public function init()
 {
     /* Place parameters in static storage for common use
        ------------------------------------------------- */
     if (!$this->mode) {
         $this->mode = 0;
     }
     //chosen default mode
     $this->temp = $this->b / $this->a;
     $this->es = 1.0 - pow($this->temp, 2);
     $this->e = sqrt($this->es);
     $this->e0 = Common::e0fn($this->es);
     $this->e1 = Common::e1fn($this->es);
     $this->e2 = Common::e2fn($this->es);
     $this->e3 = Common::e3fn($this->es);
     $this->sinphi = sin($this->lat1);
     $this->cosphi = cos($this->lat1);
     $this->ms1 = Common::msfnz($this->e, $this->sinphi, $this->cosphi);
     $this->ml1 = Common::mlfn($this->e0, $this->e1, $this->e2, $this->e3, $this->lat1);
     /* format B
        --------- */
     if ($this->mode != 0) {
         if (abs($this->lat1 + $this->lat2) < Common::EPSLN) {
             Proj4php::reportError("eqdc:Init:EqualLatitudes");
             //return(81);
         }
         $this->sinphi = sin($this->lat2);
         $this->cosphi = cos($this->lat2);
         $this->ms2 = Common::msfnz($this->e, $this->sinphi, $this->cosphi);
         $this->ml2 = Common::mlfn($this->e0, $this->e1, $this->e2, $this->e3, $this->lat2);
         if (abs($this->lat1 - $this->lat2) >= Common::EPSLN) {
             $this->ns = ($this->ms1 - $this->ms2) / ($this->ml2 - $this->ml1);
         } else {
             $this->ns = $this->sinphi;
         }
     } else {
         $this->ns = $this->sinphi;
     }
     $this->g = $this->ml1 + $this->ms1 / $this->ns;
     $this->ml0 = Common::mlfn($this->e0, $this->e1, $this->e2, $this->e3, $this->lat0);
     $this->rh = $this->a * ($this->g - $this->ml0);
 }
Пример #6
0
 public function init()
 {
     #$temp;   /* temporary variable		 */
     if ($this->lat0 == 0) {
         $this->lat0 = 90;
     }
     //$this->lat0 ca
     /* Place parameters in static storage for common use
        ------------------------------------------------- */
     $this->temp = $this->b / $this->a;
     $this->es = 1.0 - pow($this->temp, 2);
     // devait etre dans tmerc.js mais n y est pas donc je commente sinon retour de valeurs nulles
     $this->e = sqrt($this->es);
     $this->e0 = Common::e0fn($this->es);
     $this->e1 = Common::e1fn($this->es);
     $this->e2 = Common::e2fn($this->es);
     $this->e3 = Common::e3fn($this->es);
     $this->ml0 = Common::mlfn($this->e0, $this->e1, $this->e2, $this->e3, $this->lat0);
     //si que des zeros le calcul ne se fait pas
     //if (!$this->ml0) {$this->ml0=0;}
 }