GPS Location Data in Photo Metadata
Learn how GPS coordinates are embedded in photo EXIF data, how to read latitude and longitude values, and how location data flows from satellite to image file.
Detailed Explanation
How GPS Gets Into Your Photos
When location services are enabled on a camera or smartphone, the device records the GPS coordinates at the moment of capture and stores them in the EXIF GPS IFD (Image File Directory).
GPS IFD Structure
The GPS data is stored in its own IFD, separate from the main EXIF data. The key tags include:
| Tag | Name | Format | Example |
|---|---|---|---|
| 0x0001 | GPSLatitudeRef | ASCII | "N" or "S" |
| 0x0002 | GPSLatitude | RATIONAL[3] | 35/1, 41/1, 2446/100 |
| 0x0003 | GPSLongitudeRef | ASCII | "E" or "W" |
| 0x0004 | GPSLongitude | RATIONAL[3] | 139/1, 45/1, 3210/100 |
| 0x0005 | GPSAltitudeRef | BYTE | 0=above sea level |
| 0x0006 | GPSAltitude | RATIONAL | 125/1 (meters) |
Coordinate Format
GPS coordinates in EXIF are stored as three rational numbers representing degrees, minutes, and seconds (DMS format):
Latitude: 35 degrees, 41 minutes, 24.46 seconds North
→ Stored as: [35/1, 41/1, 2446/100] + "N"
→ Decimal: 35.690128
Longitude: 139 degrees, 45 minutes, 32.10 seconds East
→ Stored as: [139/1, 45/1, 3210/100] + "E"
→ Decimal: 139.758917
To convert DMS to decimal degrees: decimal = degrees + minutes/60 + seconds/3600
Accuracy
Consumer GPS in smartphones typically achieves 3-5 meter accuracy in open environments. Factors affecting accuracy:
- Clear sky: Best accuracy (3m)
- Urban canyons: Reduced accuracy (10-30m) due to signal reflection
- Indoor: Poor accuracy or no fix
- A-GPS: Assisted GPS using cell towers for faster initial fix
Additional GPS Tags
Beyond basic coordinates, the GPS IFD can store:
- GPSImgDirection: Compass direction the camera was facing
- GPSSpeed: Speed of movement at capture time
- GPSTimeStamp: UTC time from GPS satellites
- GPSDateStamp: UTC date from GPS satellites
- GPSMapDatum: Geodetic datum (usually WGS-84)
Use Case
GPS metadata in photos is used for geotagging in travel photography, automatic album organization by location in apps like Google Photos and Apple Photos, real estate documentation, journalism and evidence gathering where proving location matters, and wildlife tracking photography where recording observation locations is critical for research.