Beispiel #1
0
 public function testNAD27ToWGS84()
 {
     $LatLng = new LatLng(12.3, 12.3, RefEll::Clarke1866());
     $LatLng->NAD27ToWGS84();
     $expected = "(12.30061, 12.30145)";
     self::assertEquals($expected, $LatLng->__toString());
 }
Beispiel #2
0
 /**
  * Convert this LatLng object from NAD27 datum to WGS84 datum.
  * Reference values for transformation are taken from Wikipedia
  * @return void
  */
 public function NAD27ToWGS84()
 {
     if ($this->refEll != RefEll::Clarke1866()) {
         trigger_error('Current co-ordinates are not using the Clarke ellipsoid', E_USER_WARNING);
     }
     $wgs84 = RefEll::WGS84();
     $clarke1866 = RefEll::Clarke1866();
     $tx = -8;
     $ty = 160;
     $tz = 176;
     $s = 0;
     $rx = deg2rad(0);
     $ry = deg2rad(0);
     $rz = deg2rad(0);
     $this->transformDatum($clarke1866, $wgs84, $tx, $ty, $tz, $s, $rx, $ry, $rz);
 }