如何获得纬度和经度从图片infromation [英] How to get Latitude and Longitude infromation from picture
问题描述
我想纬度和经度的图像信息。我使用Google非常,以获取有关如何得到这个信息的任何想法。我仍然在努力......如果我发现与此相关的任何事情,我更新快...
I want latitude and longitude information from picture. I googling very much to get any Idea about how to get this information. I am still trying...If I find any thing related to this I update soon...
如果任何人有知道关于这个......那么请指导me..or提供可能的话任何解决方案。
If anybody Have idea about this...then please guide me..or provide any solution if possible..
推荐答案
搜索很之后,我发现这个问题非常简单的解决方案....所以我把它贴在这里帮助我的朋友谁拥有和我一样的问题得到从图片的地理位置....
After searching very much, I found very simple solution for this question....So I posted it here to help my friends who have problem like me to get Geo location from Picture....
Bundle bundle = getIntent().getExtras();
if(null != bundle)
{
String filepath = bundle.getString(FILE_PATH_KEY);
try
{
ExifInterface exif = new ExifInterface(filepath);
StringBuilder builder = new StringBuilder();
builder.append("Date & Time: " + getExifTag(exif,ExifInterface.TAG_DATETIME) + "\n\n");
builder.append("Flash: " + getExifTag(exif,ExifInterface.TAG_FLASH) + "\n");
builder.append("Focal Length: " + getExifTag(exif,ExifInterface.TAG_FOCAL_LENGTH) + "\n\n");
builder.append("GPS Datestamp: " + getExifTag(exif,ExifInterface.TAG_FLASH) + "\n");
builder.append("GPS Latitude: " + getExifTag(exif,ExifInterface.TAG_GPS_LATITUDE) + "\n");
builder.append("GPS Latitude Ref: " + getExifTag(exif,ExifInterface.TAG_GPS_LATITUDE_REF) + "\n");
builder.append("GPS Longitude: " + getExifTag(exif,ExifInterface.TAG_GPS_LONGITUDE) + "\n");
builder.append("GPS Longitude Ref: " + getExifTag(exif,ExifInterface.TAG_GPS_LONGITUDE_REF) + "\n");
builder.append("GPS Processing Method: " + getExifTag(exif,ExifInterface.TAG_GPS_PROCESSING_METHOD) + "\n");
builder.append("GPS Timestamp: " + getExifTag(exif,ExifInterface.TAG_GPS_TIMESTAMP) + "\n\n");
builder.append("Image Length: " + getExifTag(exif,ExifInterface.TAG_IMAGE_LENGTH) + "\n");
builder.append("Image Width: " + getExifTag(exif,ExifInterface.TAG_IMAGE_WIDTH) + "\n\n");
builder.append("Camera Make: " + getExifTag(exif,ExifInterface.TAG_MAKE) + "\n");
builder.append("Camera Model: " + getExifTag(exif,ExifInterface.TAG_MODEL) + "\n");
builder.append("Camera Orientation: " + getExifTag(exif,ExifInterface.TAG_ORIENTATION) + "\n");
builder.append("Camera White Balance: " + getExifTag(exif,ExifInterface.TAG_WHITE_BALANCE) + "\n");
builder = null;
}
catch (IOException e)
{
e.printStackTrace();
}
}
我们可以得到一个建设者串都是从图片的Exif标签信息。
We can get all the Exif tag information from picture in one builder string.
这篇关于如何获得纬度和经度从图片infromation的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!