-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasicUsage.php
More file actions
25 lines (17 loc) · 794 Bytes
/
BasicUsage.php
File metadata and controls
25 lines (17 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use Macocci7\PhpPhotoGps\PhotoGps;
$filename = 'img/with_gps.jpg'; // includes GPS tags
$pg = new PhotoGps($filename);
echo "[" . $filename . "]--------------------\n";
// Latitude in sexagesimal format
echo "Latitude: " . $pg->latitudeS() . "\n";
echo "緯度: " . $pg->lang('ja')->latitudeS() . "\n";
// Longitude in sexagesimal format
echo "Longitude: " . $pg->lang('eng')->longitudeS() . "\n";
echo "経度: " . $pg->lang('ja')->longitudeS() . "\n";
// Altitude as strings
echo "Altitude: " . $pg->lang('eng')->altitudeS() . "\n";
echo "高度: " . $pg->lang('ja')->altitudeS() . "\n";
// Coord in decimal format ('S' and 'W' results in negative value.)
echo "Coord: " . $pg->latitudeD() . ", " . $pg->longitudeD() . "\n";