Announcement

#1 2023-01-01 19:42:16

matthys
Member
2014-04-02
188

No EXIF GPS data displayed?

I just notice that the EXIF part is no longer displaying the GPS data, I only see:

GPSLatitude    Array
GPSLongitude  Array

Why is this, and what changed?

If I use the Read metadata plugin I do see the GPS data like:
GPSVersion =
GPSLatitudeRef = N
GPSLatitude
      0 = 52/1
      1 = 205019/10000
      2 = 0/1
GPSLongitudeRef = E
GPSLongitude
      0 = 4/1
      1 = 424171/10000
      2 = 0/1
GPSAltitudeRef =
GPSAltitude = 223/10
GPSTimeStamp
      0 = 14/1
      1 = 41/1
      2 = 39797/1000
GPSSatellites = 22
GPSStatus = A
GPSMeasureMode = 3
GPSDOP = 36/10
GPSImgDirectionRef = M
GPSMapDatum = WGS-84
GPSDateStamp = 2022:06:03

Has this something to do with the Exif View plugin?
I also use the Bootstrap Darkroom theme.

Piwigo 13.4.0
Installed on 25 April 2014, 8 years 8 months 6 days ago
Operating system: Linux
PHP: 8.1.2-1ubuntu2.9 (Show info) [2023-01-01 19:39:05]
MySQL: 8.0.31-0ubuntu0.22.04.1 [2023-01-01 19:39:05]
Graphics Library: ImageMagick 6.9.11-60

Thanks,
Matthijs

Offline

 

#2 2024-01-18 21:10:14

jheinitz
Member
2015-02-16
21

Re: No EXIF GPS data displayed?

Hello!

Do you still fix this issue? I think I found the solution. Here is my EXIF related config in

// use_exif_mapping: same behaviour as use_iptc_mapping
$conf['use_exif_mapping'] = array(
  'date_creation' => 'DateTimeOriginal',
  'latitude' => 'latitude',
  'longitude' => 'longitude'
  );

It used to be something like this:

// use_exif_mapping: same behaviour as use_iptc_mapping
$conf['use_exif_mapping'] = array(
  'date_creation' => 'DateTimeOriginal',
  'latitude' => 'GPSLatitude',
  'longitude' => 'GPSLongitude'
  );

There is a function 'parse_exif_gps_data' in file functions_metadata.inc.php that reads a comination of GPSLatitude and GPSLatitudeRef to return the field 'latitude'. Same for the field 'longitude'.

Good luck.

Best regards

Jens

Offline

 

#3 2024-01-21 18:10:53

matthys
Member
2014-04-02
188

Re: No EXIF GPS data displayed?

Hmmmm ... you are right, that seems to work.

But at some point somebody changed it ... but why?

BTW .. I only needed to change the 'show_exif_fields:

$conf['show_exif_fields'] = array(

  'latitude',
  'longitude',

  );

So far I do not like it as these field are not with capital letter, would prefer GPSLatitude and GPSLongitude

At least now I know where to look for it ....

Small UPDATE, I added these to the languages under LocalFiles Editor (for me local/language/en_UK.lang.php);
$lang['exif_field_latitude'] = 'GPSLatitude';
$lang['exif_field_longitude'] = 'GPSLongitude';

THANKS!

I now also wonder how to add custom fields (like UndefinedTag:0xA434 = Lens Model).

Last edited by matthys (2024-01-21 19:13:21)

Offline

 

#4 2024-01-21 19:32:53

erAck
Only trying to help
2015-09-06
1998

Re: No EXIF GPS data displayed?

The tag names must be written exactly as EXIF provides them, else nothing is displayed for that key. To display different names you maybe could use the language feature, but I never tried. See local/config/config.inc.php comment for $conf['show_exif_fields'], so for latitude that might be $lang['exif_field_latitude'] in local/language/*.lang.php

On the other hand I wonder why this is latitude here, as the EXIF tag name is actually GPSLatitude. latitude and longitude are XMP tag names.
See man Image::ExifTool::TagNames

From that, there should be

Code:

         0xa432   LensInfo                  ExifIFD    rational64u[4]
         0xa433   LensMake                  ExifIFD    string
         0xa434   LensModel                 ExifIFD    string
         0xa435   LensSerialNumber          ExifIFD    string

Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2024-01-21 19:49:45

matthys
Member
2014-04-02
188

Re: No EXIF GPS data displayed?

erAck wrote:

The tag names must be written exactly as EXIF provides them, else nothing is displayed for that key.

I wonder, if Read metadata plugin shows the key 'GPSLatitude', why doesn't it work with that key and I need to use 'latitude'? And before it worked ... with version 13 it stopped (but could also be PHP version related - I understand that).

BTW ... I did the test as written in the help for exif using the /tools/metadata.php (and added the sample.jpg) and shows:

Code:

    [GPSLatitudeRef] => N
    [GPSLatitude] => Array
        (
            [0] => 52/1
            [1] => 204975/10000
            [2] => 0/1
        )

    [GPSLongitudeRef] => E
    [GPSLongitude] => Array
        (
            [0] => 4/1
            [1] => 424370/10000
            [2] => 0/1
        )

Does this explain why without modification it shows the Array in the Exif part?
GPSLatitude    Array
GPSLongitude  Array

Last edited by matthys (2024-01-21 20:04:50)

Offline

 

#6 2024-01-21 20:04:40

erAck
Only trying to help
2015-09-06
1998

Re: No EXIF GPS data displayed?

I don't know. All this EXIF and what is or is not supported by which PHP or Piwigo or plugin or whatever (i.e. the PHP exif_read_data() function in what version) is somewhat a mystery to me. I only know that Exiftool actually works..


Running Piwigo at https://erack.net/gallery/

Offline

 

#7 2024-01-21 20:14:11

matthys
Member
2014-04-02
188

Re: No EXIF GPS data displayed?

That is really funny ... I added 'UndefinedTag:0xA434' in the show_exif_fields part and now I get:

https://i.postimg.cc/xTpVbPD9/Piwigo-Exif-Metadata.jpg

I do get a Lens icon with correct lens, and also in the detailed information :-)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact