Created
December 5, 2017 09:55
-
-
Save anonymous/27da56ce310d896c81083e1f496074c2 to your computer and use it in GitHub Desktop.
Projection file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PHPCoord\TransverseMercator; | |
class Concrete_UTM80 extends TransverseMercator | |
{ | |
protected $prj = ''; | |
protected $easting = 500000; | |
protected $northing = 0; | |
protected $latitude = 0; | |
protected $longitude = 0; | |
protected $scaleFactor = 0.9996; | |
function __construct($x, $y, $z, $projection_wkt) | |
{ | |
$this->prj = $projection_wkt; | |
parent::__construct($x, $y, $z, PHPCoord\RefEll::grs80()); | |
$this->processProjection(); | |
} | |
public function getReferenceEllipsoid() | |
{ | |
return PHPCoord\RefEll::grs80(); | |
} | |
protected function processProjection() | |
{ | |
$this->latitude = Latitude_Of_Origin; | |
$this->longitude = Central_Meridian; | |
$this->easting = False_Easting; | |
$this->northing = False_Northing; | |
$this->scaleFactor = Scale_Factor; | |
} | |
public function toLatLng() | |
{ | |
$N = $this->y; | |
$E = $this->x; | |
$N0 = $this->getOriginNorthing(); | |
$E0 = $this->getOriginEasting(); | |
$phi0 = $this->getOriginLatitude(); | |
$lambda0 = $this->getOriginLongitude(); | |
return $this->convertToLatitudeLongitude($N, $E, $N0, $E0, $phi0, $lambda0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment