Last modified: 2014-05-23 01:07:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T34074, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32074 - Non-standard EXIF GPS location not displayed
Non-standard EXIF GPS location not displayed
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.18.x
All All
: Lowest minor (vote)
: ---
Assigned To: Nobody - You can work on this!
https://commons.wikimedia.org/wiki/Fi...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-31 09:29 UTC by Lupo
Modified: 2014-05-23 01:07 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Lupo 2011-10-31 09:29:29 UTC
The file (see URL above) does have geolocation info in the EXIF (37.769612N, 122.433282W), but MW1.18 as deployed at the Commons doesn't display it.

This is a regression, previous MW versions did display the geolocation in the EXIF for this file.

exiftool can also extract the geolocation: http://regex.info/exif.cgi?imgurl=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F6%2F62%2FDubocePark.jpg
Comment 1 Bawolff (Brian Wolff) 2011-10-31 13:01:09 UTC
I don't think this file has GPS data encoded in the way the standard specifies.

Basically, per http://www.exif.org/Exif2-2.PDF GPSLatitude and GPSLongitude are supposed to be a three element array with the elements being Degrees, minutes, seconds. This file just has a single rational value these two properties. It works in exiftool because exiftool is forgiving (We should also perhaps be forgiving as well). The file probably doesn't work that well in other software (Exiv2 for example says the latitude is 37769612/1000000, where most files it would format the latitude into nice 37 degrees, x', y''.)

>This is a regression, previous MW versions did display the geolocation in the
>EXIF for this file.

Previous Mediawiki was doing wrong things regarding GPS exif tags, that just happened to make it work for this particular case.
Comment 2 Lupo 2011-10-31 22:05:20 UTC
I also understand the EXIF standard to say that there must be three rationals.
Yet it would be nice if we could be more permissive here. ("Be liberal in what you accept...")

After all, PHP's exif_read_data *can* read this geolocation fine, otherwise even previous MW versions could not have displayed it correctly. I think exif_read_data returns either just one RATIONAL, or an array with only one element. (Don't remember which.)

The file is at least consistent, it contains

00 02 00 05 00 00 00 01 00 00 0E DF 

which is "00 02"->(tag: GPSLatitude), "00 05"->(type: Rational), "00 00 00
01"->(count: 1), "00 00 0E DF"->(offset for value > 4 bytes). The value at the
offset is then "02 40 51 8C 00 0F 42 40", which is 37769612/1000000, i.e.
37.769612 degrees.

Since exif_read_data can deal with it, it'd be really nice if our Exif.php could also handle it.
Comment 3 Bawolff (Brian Wolff) 2011-10-31 22:34:22 UTC
>I also understand the EXIF standard to say that there must be three rationals.
>Yet it would be nice if we could be more permissive here. ("Be liberal in what
>you accept...")

I agree that we should be liberal, I just feel it's a low priority issue since the file is not doing what the standard says (and there aren't an over-abundance of such files)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links