public function forward(Point $p) { list($lon, $lat) = $p->toArray(); // convert to radians if ($lat <= 90.0 && $lat >= -90.0 && $lon <= 180.0 && $lon >= -180.0) { //lon = lon * Common::D2R; //lat = lat * Common::D2R; } else { Proj4php::reportError('lcc:forward: llInputOutOfRange: ' . $lon . ' : ' . $lat); return; } $con = abs(abs($lat) - Common::HALF_PI); if ($con > Common::EPSLN) { $ts = Common::tsfnz($this->e, $lat, sin($lat)); $rh1 = $this->a * $this->f0 * pow($ts, $this->ns); } else { $con = $lat * $this->ns; if ($con <= 0) { Proj4php::reportError('lcc:forward: No Projection'); return; } $rh1 = 0; } $theta = $this->ns * Common::adjust_lon($lon - $this->long0); $p->x = $this->k0 * ($rh1 * sin($theta)) + $this->x0; $p->y = $this->k0 * ($this->rh - $rh1 * cos($theta)) + $this->y0; return $p; }