Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ Sr no | Project Name | Author
18 | [Send emails](https://github.com/chavarera/python-mini-projects/tree/master/projects/send%20email%20from%20CSV) | [Mitesh](https://github.com/Mitesh2499)
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)|
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)

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)
14 changes: 14 additions & 0 deletions projects/Get meta information of images/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Get meta information of images

### usage

python get_meta_from_pic image_name

### note

Make sure the picture contains location information, otherwise the location cannot be obtained

you need fill in your email address to use the function in gps_utils.py:
```python
geolocator = Nominatim(user_agent = "your email")
```
5 changes: 4 additions & 1 deletion projects/Get meta information of images/gps_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
def format_lati_long(data):
list_tmp=str(data).replace('[', '').replace(']', '').split(',')
list=[ele.strip() for ele in list_tmp]
data_sec = int(list[-1].split('/')[0]) /(int(list[-1].split('/')[1])*3600)
if (list[-1].find('/') != -1):
data_sec = int(list[-1].split('/')[0]) /(int(list[-1].split('/')[1])*3600)
else:
data_sec = int(list[-1])/3600
data_minute = int(list[1])/60
data_degree = int(list[0])
result=data_degree + data_minute + data_sec
Expand Down