This one displays the EXIF GPS coordinates of all .jpg and .tiff files in a folder in a custom column.
It does not require external tools like exiv2 (http://www.exiv2.org/index.html)
The snippet code:
Code: Select all
Snip: CustomColumn 1
XYplorer 26.50.0004, 10.10.2024 09:45:38
Action
ConfigureColumn
Caption
GPS
Type
3
Definition
$latitude = get("exif", 0x0002, <cc_item>); // 52/1 13/1 85053/2500 => 52° 13' 34.02"N => 52.2261166667
$longitude = get("exif", 0x0004, <cc_item>); // 13/1 13/1 134931/2500 => 13° 13' 53.97"E => 13.2316583333
if ($latitude == "" || $longitude == "") { return "<no gps coordinates>"; }
$latRef = get("exif", 0x0001, <cc_item>); // N / S
$longRef = get("exif", 0x0003, <cc_item>); // W / E
$latDegree = gettoken(gettoken($latitude, 1), 1, "/");
$latMinutes = gettoken(gettoken($latitude, 2), 1, "/");
$latSeconds = replace(round(eval(gettoken($latitude, 3)), 2), ",", ".");
$longDegree = gettoken(gettoken($longitude, 1), 1, "/");
$longMinutes = gettoken(gettoken($longitude, 2), 1, "/");
$longSeconds = replace(round(eval(gettoken($longitude, 3)), 2), ",", ".");
return $latDegree . "° " . $latMinutes . "' " . $latSeconds . '"' . $latRef . " ". $longDegree . "° " . $longMinutes . "' " . $longSeconds . '"' . $longRef;
Format
0
Trigger
0
Item Type
0
Item Filter
jpg;tiff
XYplorer Beta Club
