joakimb
joakimb

Reputation: 563

How do I access geotags in iphone-pictures

I am trying to access the gps-coordinates stored in the metadata of a picture taken with the iphones camera. I can extract some information from the picture (colorspace, resolution etc) but i cant seem to get to the geotag. How do I do this?

I access the meta data using this line of code:

NSDictionary *metaData = [info objectForKey:UIImagePickerControllerMediaMetadata];

where "info" is the NSDictionary reurned by UIImagePickerController

Upvotes: 1

Views: 1210

Answers (1)

Perception
Perception

Reputation: 80603

There are a list of keys available from Apple, for images that have Global Positioning Information.

http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CGImageProperties_Reference/Reference/reference.html

I would assume you are interested mainly in:

const CFStringRef kCGImagePropertyGPSLatitude;
const CFStringRef kCGImagePropertyGPSLongitude;

Upvotes: 2

Related Questions