예제 #1
0
파일: Tmerc.php 프로젝트: rldhont/proj4php
 /**
  * 
  */
 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
파일: Tmerc.php 프로젝트: proj4php/proj4php
 /**
  * 
  */
 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);
 }
예제 #3
0
파일: Utm.php 프로젝트: rldhont/proj4php
 /**
  *
  * @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);
 }
예제 #4
0
파일: Eqdc.php 프로젝트: rldhont/proj4php
 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);
 }
예제 #5
0
파일: Poly.php 프로젝트: rldhont/proj4php
 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;}
 }