如何在iphone图片中访问地理标记

时间:2011-07-19 22:03:51

标签: iphone geolocation uiimage

我正在尝试访问存储在使用iphone相机拍摄的照片的元数据中的gps坐标。我可以从图片中提取一些信息(颜色空间,分辨率等),但我似乎无法进入地理标记。我该怎么做?

我使用以下代码行访问元数据:

NSDictionary *metaData = [info objectForKey:UIImagePickerControllerMediaMetadata];

其中“info”是由NSDictionary

重新归档的UIImagePickerController

1 个答案:

答案 0 :(得分:2)

对于具有全球定位信息的图像,Apple提供了一系列密钥。

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

我认为你主要对以下内容感兴趣:

const CFStringRef kCGImagePropertyGPSLatitude;
const CFStringRef kCGImagePropertyGPSLongitude;