@@ -50,8 +50,8 @@ class Exiftool implements MapperInterface
50
50
const TITLE = 'Title ' ;
51
51
const XRESOLUTION = 'XResolution ' ;
52
52
const YRESOLUTION = 'YResolution ' ;
53
- const GPSLATITUDEREF = 'GPSLatitudeRef ' ;
54
- const GPSLONGITUDEREF = 'GPSLongitudeRef ' ;
53
+ const GPSLATITUDE = 'GPSLatitude ' ;
54
+ const GPSLONGITUDE = 'GPSLongitude ' ;
55
55
56
56
/**
57
57
* Maps the ExifTool fields to the fields of
@@ -86,8 +86,8 @@ class Exiftool implements MapperInterface
86
86
self ::YRESOLUTION => Exif::VERTICAL_RESOLUTION ,
87
87
self ::IMAGEWIDTH => Exif::WIDTH ,
88
88
self ::CAPTIONABSTRACT => Exif::CAPTION ,
89
- self ::GPSLATITUDEREF => Exif::GPS ,
90
- self ::GPSLONGITUDEREF => Exif::GPS ,
89
+ self ::GPSLATITUDE => Exif::GPS ,
90
+ self ::GPSLONGITUDE => Exif::GPS ,
91
91
);
92
92
93
93
/**
@@ -145,10 +145,10 @@ public function mapRawData(array $data)
145
145
$ focalLengthParts = explode (' ' , $ value );
146
146
$ value = (int ) reset ($ focalLengthParts );
147
147
break ;
148
- case self ::GPSLATITUDEREF :
148
+ case self ::GPSLATITUDE :
149
149
$ gpsData ['lat ' ] = $ this ->extractGPSCoordinates ($ value );
150
150
break ;
151
- case self ::GPSLONGITUDEREF :
151
+ case self ::GPSLONGITUDE :
152
152
$ gpsData ['lon ' ] = $ this ->extractGPSCoordinates ($ value );
153
153
break ;
154
154
}
@@ -165,11 +165,11 @@ public function mapRawData(array $data)
165
165
if ($ latitude !== false && $ longitude !== false ) {
166
166
$ gpsLocation = sprintf (
167
167
'%s,%s ' ,
168
- (strtoupper ($ data [self :: GPSLATITUDEREF ][0 ]) === 'S ' ? -1 : 1 ) * $ latitude ,
169
- (strtoupper ($ data [self :: GPSLONGITUDEREF ][0 ]) === 'W ' ? -1 : 1 ) * $ longitude
168
+ (strtoupper ($ data [' GPSLatitudeRef ' ][0 ]) === 'S ' ? -1 : 1 ) * $ latitude ,
169
+ (strtoupper ($ data [' GPSLongitudeRef ' ][0 ]) === 'W ' ? -1 : 1 ) * $ longitude
170
170
);
171
171
172
- $ key = $ this ->map [self ::GPSLATITUDEREF ];
172
+ $ key = $ this ->map [self ::GPSLATITUDE ];
173
173
174
174
$ mappedData [$ key ] = $ gpsLocation ;
175
175
}
0 commit comments