Пример #1
0
 /**
  * Creates a Lambert projection geograpic point object
  *
  * @param float  $easting  Easting in decimal meters
  * @param float  $northing Northing in decimal meters
  * @param object $config   Configuration of the Lambert calculations
  * @param string $datum    The datum to use
  *
  * @return void
  */
 public function __construct($easting, $northing, GeographicPoint_Lambert_Config $config, $datum = '')
 {
     $this->lccEasting = $easting;
     $this->lccNorthing = $northing;
     $this->config = $config;
     parent::__construct($datum);
 }
Пример #2
0
 /**
  * Constructs a Universal Transverse Mercator object
  *
  * @param float  $easting  Easting in decimal meters
  * @param float  $northing Northing in decimal meters
  * @param mixed  $zone     Pass in a string, and it has to be the zone is in
  *                         ASCII, for example '10S'.
  *                         Reference zone on this map http://www.dmap.co.uk/utmworld.htm
  *                         Pass in an array with longitude_of_origin and
  *                         latitude_of_origin as keys and the values as doubles.
  * @param string $datum    The datum to use
  *
  * @return void
  */
 public function __construct($easting, $northing, $zone, $datum = '')
 {
     $this->utmEasting = $easting;
     $this->utmNorthing = $northing;
     if (is_string($zone)) {
         $this->utmZone = $zone;
         $this->latitude_of_origin = $this->latitudeToZoneLetter(substr($zone, -1, 1));
         $this->longitude_of_origin = $this->calculateLongitudeOfOrigin(intval($zone));
     } elseif (is_array($zone)) {
         $this->latitude_of_origin = $zone['latitude_of_origin'];
         $this->longitude_of_origin = $zone['longitude_of_origin'];
         $this->utmZone = $this->zone();
     }
     parent::__construct($datum);
 }
Пример #3
0
 /**
  * Sets the latitude and longitude
  *
  * North latitudes are positive, South
  * latitudes are negative. $long and $lat should be in decimal degrees.
  *
  * Longitudes
  * east of the prime meridian (i.e. east of Greenwich) are positive, longitudes
  * west of the prime meridian are negative.
  *
  * @param float  $lat   Latitude
  * @param float  $long  Longitude
  * @param string $datum The datum to use
  *
  * @return void
  */
 public function __construct($latitude, $longitude, $datum = '')
 {
     $this->latitude = $latitude;
     $this->longitude = $this->longitude = $longitude;
     parent::__construct($datum);
 }