= 0 ? $pos : $neg; $coordinate = abs($coordinate); $degree = intval($coordinate); $coordinate = ($coordinate - $degree) * 60; $minute = intval($coordinate); $second = ($coordinate - $minute) * 60; return sprintf("%s %d° %02d′ %05.2f″", $sign, $degree, $minute, $second); } ?> gef : iPhone photo geotagging mashup