function geocoder_exif_from in Geocoder 7
Plugin callback.
1 call to geocoder_exif_from()
- geocoder_exif in plugins/
geocoder_handler/ exif.inc - Plugin callback.
File
- plugins/
geocoder_handler/ exif.inc, line 60
Code
function geocoder_exif_from($dir, $data) {
foreach ($data as $k => $item) {
list($deg, $pct) = explode('/', $item);
if ($pct) {
$data[$k] = $deg / $pct;
}
}
$point = (double) $data[0] + $data[1] / 60 + $data[2] / 3600;
if (in_array($dir, array(
'S',
'W',
), TRUE)) {
$point = $point * -1;
}
return $point;
}