图像元数据中的GPS值不正确

时间:2017-08-31 22:32:54

标签: ios swift xamarin

使用UIImagePickerController使用设备相机拍摄照片(未从照片库中选取)我正试图检索GPS数据。看起来数据正在被写入(尽管网上有其他答案说苹果应该将其剥离出来?)但是经度从未设定过。我尝试了多次尝试,我总是留下0经度。

请参阅下面的输出:

"{TIFF}" = {
    DateTime = "2017:08:31 18:17:05";
    Make = Apple;
    Model = "iPhone SE";
    Orientation = 6;
    ResolutionUnit = 2;
    Software = "10.3.3";
    XResolution = 72;
    YResolution = 72;
};
"PixelWidth" = 4032;
"{Exif}" = {
    ApertureValue = "2.275007124536905";
    BrightnessValue = "-1.720482836665409";
    ColorSpace = 1;
    DateTimeDigitized = "2017:08:31 18:17:05";
    DateTimeOriginal = "2017:08:31 18:17:05";
    ExposureBiasValue = 0;
    ExposureMode = 0;
    ExposureProgram = 2;
    ExposureTime = "0.06666666666666667";
    FNumber = "2.2";
    Flash = 24;
    FocalLenIn35mmFilm = 29;
    FocalLength = "4.15";
    ISOSpeedRatings =     (
        500
    );
    LensMake = Apple;
    LensModel = "iPhone SE back camera 4.15mm f/2.2";
    LensSpecification =     (
        "4.15",
        "4.15",
        "2.2",
        "2.2"
    );
    MeteringMode = 5;
    PixelXDimension = 4032;
    PixelYDimension = 3024;
    SceneType = 1;
    SensingMethod = 2;
    ShutterSpeedValue = "3.906969875959835";
    SubjectArea =     (
        2015,
        1511,
        2217,
        1330
    );
    SubsecTimeDigitized = 980;
    SubsecTimeOriginal = 980;
    WhiteBalance = 0;
};
"PixelHeight" = 3024;
"{GPS}" = {
    Altitude = 111;
    AltitudeRef = 0;
    DateStamp = "2017:08:31";
    ImgDirection = 0;
    ImgDirectionRef = T;
    Latitude = "40.33291333333333";
    LatitudeRef = N;
    Longitude = 0;
    LongitudeRef = W;
    Speed = 0;
    SpeedRef = K;
    TimeStamp = "10:17:03";
};
"{JFIF}" = {
    DensityUnit = 0;
    JFIFVersion =     (
        1,
        0,
        1
    );
    XDensity = 72;
    YDensity = 72;
};
"ProfileName" = "sRGB IEC61966-2.1";
"DPIWidth" = 72;
"DPIHeight" = 72;
"ColorModel" = "RGB";
"Orientation" = 6;
"Depth" = 8;

1 个答案:

答案 0 :(得分:0)

根据其他answers,您必须首先从CLLocation检索位置数据,然后自行检索位置数据。如果您需要将其包含在图片的EXIF数据中,则可以自己add it