function coordinate_to_number($a) { if (is_string($a)) { $a = coordinate_take_apart($a); } return $a[0] * ($a[3] + $a[2] * 60 + $a[1] * 3600); }
function data_to_real(&$x, &$y) { $x = coordinate_to_number(coordinate_take_apart($x)); $y = coordinate_to_number(coordinate_take_apart($y)); $z = $x; $x = $y; $y = $z; # Switching y/x to x/y $y = 90 * 3600 - $y; # displaying from north to south # Recording min and max for viewbox $this->min_x = min($this->min_x, $x); $this->min_y = min($this->min_y, $y); $this->max_x = max($this->max_x, $x); $this->max_y = max($this->max_y, $y); }