/**
  * Create a SWEREF99 position by converting a WGS84 position.
  *
  * @param position WGS84 position to convert
  * @param projection Projection to convert to
  */
 private function SWEREF99PositionPositionProjection(WGS84Position $position, $projection)
 {
     parent::__construct(Grid::SWEREF99);
     $gkProjection = new GaussKreugerProjection();
     $gkProjection->swedish_params($this->getProjectionString($projection));
     list($this->latitude, $this->longitude) = $gkProjection->geodetic_to_grid($position->getLatitude(), $position->getLongitude());
     $this->projection = $projection;
 }
 public function __construct()
 {
     $args = func_get_args();
     if (empty($args)) {
         //Create a new WGS84 position with empty coordinates
         parent::__construct(Grid::WGS84);
     } elseif (count($args) == 2) {
         if (is_numeric($args[0]) && is_numeric($args[1])) {
             //Create a new WGS84 position with latitude and longitude
             parent::__construct($args[0], $args[1], Grid::WGS84);
         } elseif (is_string($args[0]) && is_int($args[1])) {
             parent::__construct(Grid::WGS84);
             $this->WGS84PositionString($args[0], $args[1]);
         }
     }
 }