/** * Returns a element with the DMS (Degrees Minutes Seconds) Format like: N 70° 50' 12" E 15° 12' 47.34". * * @param boolean $reverse Should the direction char placed at the end of the resulting string? * e.g. like: 70° 50' 12" N 15° 12' 47.34" E (default=FALSE) * @param boolean $withoutSpaces Remove all whitespace characters from resulting string? (default=FALSE) * @param integer $secondsDecimalPlaces Round seconds to decimal places, defined here (default=3) * @param string $separator The separator between latitude (first element) and longitude for return * @return string */ public function formatDMS(bool $reverse = false, bool $withoutSpaces = false, int $secondsDecimalPlaces = 3, string $separator = ' ') : string { $returnValue = ''; if (!$this->isValid()) { return $returnValue; } $res = $this->Latitude->formatDMS($reverse, $withoutSpaces, $secondsDecimalPlaces) . (empty($separator) ? ' ' : $separator) . $this->Longitude->formatDMS($reverse, $withoutSpaces, $secondsDecimalPlaces); return $res; }