« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Import and Export Formats
Import GPS Information from JPEG and View Local Map with Wolfram|Alpha
Import GPS information from JPEG and view local map with Wolfram|Alpha.
In[1]:=
X
image = Import["wolfram.jpg", "ImageWithExif"];
In[2]:=
X
exif = OptionValue[OptionValue[Options[image], MetaInformation], "Exif"];
In[3]:=
X
FilterRules[exif, {"GPSLatitude", "GPSLatitudeRef", "GPSLongitude", "GPSLongitudeRef"}]
Out[3]=
In[4]:=
X
{image, WolframAlpha[(ToString[ "GPSLatitude" /. # /. {x_, y_, z_} :> N[x + y/60 + z/3600]] <> ("GPSLatitudeRef" /. #) <> ToString[ "GPSLongitude" /. # /. {x_, y_, z_} :> N[x + y/60 + z/3600]] <> ("GPSLongitudeRef" /. #1) &)[ exif], {"CartographicMap", "Image"}][[1, 2]]}
Out[4]=