Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

Commit ba75a52

Browse files
authored
Merge pull request #51 from Xlgd/master
update README.md
2 parents 2f20d75 + 3414c61 commit ba75a52

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ Sr no | Project Name | Author
4040
18 | [Send emails](https://github.com/chavarera/python-mini-projects/tree/master/projects/send%20email%20from%20CSV) | [Mitesh](https://github.com/Mitesh2499)
4141
19 | [Get Ipaddress and Hostname of Website](https://github.com/chavarera/python-mini-projects/tree/master/projects/Find%20Out%20Hostname%20and%20IP%20address) | [Nuh Mohammed](https://github.com/NuhMohammed)|
4242
20 | [Progressbar using tqdm](https://github.com/chavarera/python-mini-projects/tree/master/projects/Terminal%20Progress%20Bar%20with%20Images%20Resizing) | [Mitesh](https://github.com/Mitesh2499)
43-
43+
21 | [Get meta information of images](https://github.com/Xlgd/python-mini-projects/tree/master/projects/Get%20meta%20information%20of%20images) | [Gaodong](https://github.com/xlgd)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Get meta information of images
2+
3+
### usage
4+
5+
python get_meta_from_pic image_name
6+
7+
### note
8+
9+
Make sure the picture contains location information, otherwise the location cannot be obtained
10+
11+
you need fill in your email address to use the function in gps_utils.py:
12+
```python
13+
geolocator = Nominatim(user_agent = "your email")
14+
```

projects/Get meta information of images/gps_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
def format_lati_long(data):
66
list_tmp=str(data).replace('[', '').replace(']', '').split(',')
77
list=[ele.strip() for ele in list_tmp]
8-
data_sec = int(list[-1].split('/')[0]) /(int(list[-1].split('/')[1])*3600)
8+
if (list[-1].find('/') != -1):
9+
data_sec = int(list[-1].split('/')[0]) /(int(list[-1].split('/')[1])*3600)
10+
else:
11+
data_sec = int(list[-1])/3600
912
data_minute = int(list[1])/60
1013
data_degree = int(list[0])
1114
result=data_degree + data_minute + data_sec

0 commit comments

Comments
 (0)