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开发者_StackOverflow社区, 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
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;
精彩评论