Page MenuHomePhabricator

Special:UploadWizard web-based uploader does not detect GPS from some Pictures
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

upload wizard does not detect GPS coordinates.
It does seem to detect GPS direction though, so some metadata seems to have been parsed

What should have happened instead?:
GPS coordinates should've been prefilled by UploadWizard (as it happens with most of my other images)

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

manually checking the images with exiftool however shows GPS coordinates just fine, and other geolocation enabled apps (like JOSM open the pictures at correct locations.

ExifTool Version Number         : 12.57
File Name                       : 3945757_1.jpg
Directory                       : .
File Size                       : 330 kB
File Modification Date/Time     : 2023:10:18 02:21:21+02:00
File Access Date/Time           : 2023:10:20 11:53:51+02:00
File Inode Change Date/Time     : 2023:10:20 11:53:33+02:00
File Permissions                : -rw-------
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Exif Byte Order                 : Big-endian (Motorola, MM)
Orientation                     : Unknown (0)
Light Source                    : Unknown
GPS Latitude                    : 45 deg 48' 26.63"
GPS Longitude                   : 15 deg 55' 51.78"
GPS Img Direction Ref           : Magnetic North
GPS Img Direction               : 73.53
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 1
Y Resolution                    : 1
Profile CMM Type                : 
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 0000:00:00 00:00:00
Profile File Signature          : acsp
Primary Platform                : Unknown ()
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : 
Device Model                    : 
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Media-Relative Colorimetric
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : 
Profile ID                      : 0
Profile Description             : sRGB
Red Matrix Column               : 0.43607 0.22249 0.01392
Green Matrix Column             : 0.38515 0.71687 0.09708
Blue Matrix Column              : 0.14307 0.06061 0.7141
Red Tone Reproduction Curve     : (Binary data 40 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 40 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 40 bytes, use -b option to extract)
Media White Point               : 0.9642 1 0.82491
Profile Copyright               : Google Inc. 2016
Image Width                     : 1280
Image Height                    : 1707
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 1280x1707
Megapixels                      : 2.2
GPS Position                    : 45 deg 48' 26.63", 15 deg 55' 51.78"

possibly related issue: https://phabricator.wikimedia.org/T223051

Event Timeline

In my particular case, it seems that while other software (like JOSM etc.) were happily accepting the .jpg files as georeferenced, https://commons.wikimedia.org/wiki/Special:UploadWizard didn't.

I've tracked it down to images missing following tags:

[GPS]           GPSLongitudeRef                 : E
[GPS]           GPSLatitudeRef                  : N

adding them manually, e.g. with exiftool -v2 -GPSLatitudeRef=N -GPSLongitudeRef=E 4178451_1_new.jpg makes images work for Commons UploadWizard too.

Both fields are a requirement for GPS exif coordinates.

https://exiftool.org/TagNames/GPS.html

When adding GPS information to an image, it is important to set all of the following tags: GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef, and GPSAltitude and GPSAltitudeRef if the altitude is known