別人說經過一張照片就能夠定位你的位置,看來個視頻,仔細研究了一下本身的照片沒想到真的能夠作到,想一想真的有點可怕。python
如何經過一張照片去定位這張照片的經緯度下面我以我手機中的照片爲例。git
咱們經過python3 去讀取照片的信息 下面是我用python3寫的代碼spa
import exifread
import re
def imageread():
GPS = {}
date = ''
f = open("E:\\2.jpg",'rb')
imagetext = exifread.process_file(f)
for key in imagetext: #打印鍵值對
print(key,":",imagetext[key])
print('********************************************************\n********************************************************')
for q in imagetext: #打印該圖片的經緯度 以及拍攝的時間
if q == "GPS GPSLongitude":
print("GPS經度 =", imagetext[q],imagetext['GPS GPSLatitudeRef'])
elif q =="GPS GPSLatitude":
print("GPS緯度 =",imagetext[q],imagetext['GPS GPSLongitudeRef'])
elif q =='Image DateTime':
print("拍攝時間 =",imagetext[q])
imageread()
![](http://static.javashuo.com/static/loading.gif)
將這個經緯度轉化一下。將轉換的結果上網查一下。視頻
以上就是經過圖片進行的定位的過程。blog