---
# System prepended metadata

title: Locate Me

---

# Locate Me

From: HKCERT22
Solved by: notming / chemistrying (aka DarkChemist)

## Problem
> We got 297 pictures. Some of them are the same. What does these pictures represents?

## Idea 1
There are some pictures duplicated. Are these related?

## Idea 2
There are some locations in the picture info. Does it help?

## Idea 3
Are the duplicates really the same?

## Idea 4
Are there any hidden files in the folder?

## Idea X
...

## Answers to Ideas
### Idea 1
These duplicated pictures seems don't have relation ships... They look random...

### Idea 2
Maybe? They have different latitudes and longtitudes positions, even for the same photo (Check 6.jpg and 7.jpg).

### Idea 3
Yes and no. Duplicated photos are same in terms of pixels. Their GPS info are not the same as I have mentioned in Idea 2. 

### Idea 4
No.

## How did I came up the Solution
Basically, brainstorm every ideas you have got during your thinking process.
For example: \
Before I even check out their latitudes and longitudes, I have this in mind: \
Since the photos are taken in different positions, do the locations connect to each other on the map? \
I got this idea from "Detective Conan: Dimensional Sniper" (lol).

![](https://i.imgur.com/nrD6scw.jpg)
![](https://i.imgur.com/ytfg9zB.jpg)
![](https://i.imgur.com/lErRwCC.jpg)

Let's connect the points together by using their latitudes and longitudes!

<img src="https://i.imgur.com/mirSAjU.jpg" width="360" height="800">
<!-- ![](https://i.imgur.com/mirSAjU.jpg) -->

Thanks for notming to try this ~~bullsheet~~ interesting idea up manually, we noticed something is formed!
> I feel like I just spotted something I couldn't see before on a map... \
> It's an `h`! \
> This shape woudn't just appear by chance! It had to have been planned intentionally!

## Solution
Plotting this manually is too slow. Let's code a Python script to help us!
By Googling some details on how to extract the GPS location of a photo and plot the points out, we've got something like this:
```py
import os
from GPSPhoto import gpsphoto
import gmplot

# Obtain the file list in the current directory
image_list = os.listdir('.')

# Extract the .jpg files only
image_list = [a for a in image_list if a.endswith('jpg')]

# Initiate a google map (I google this)
gm1 = gmplot.GoogleMapPlotter(0, 0, 0)

# Latitude list
la_list = []

# Logitude list
lo_list = []

# Looping for each image
for a in image_list: 
    # Extract its GPS Data (I google this)
    data = gpsphoto.getGPSData(os.getcwd() + f'\\{a}')
    # Extract its latitude and longitude
    la = data['Latitude']
    lo = data['Longitude']

    # Add them to the according list
    la_list.append(la)
    lo_list.append(lo)

# Plot the points on the Googla Map (I google this also)
gm1.scatter(la_list, lo_list, "#FF0000", size=10, marker=False)

# Output the file to an html (I google this also)
gm1.draw(".\\ans.html")
```
After running for a few seconds, we got the result. Let's open the html file!

![](https://i.imgur.com/NAGWvYk.png)

Yeah! We got it!

## Note
Why don't I use `matplotlib.pyplot`? \
I don't know why but I didn't get the flag using this module with the following code:
```py
import os
from GPSPhoto import gpsphoto
import matplotlib.pyplot as plt

image_list = os.listdir('.')
image_list = [a for a in image_list if a.endswith('jpg')]
for a in image_list: 
    data = gpsphoto.getGPSData(os.getcwd() + f'\\{a}')
    plt.scatter(data['Longitude'], data['Latitude'])

plt.show()
```
Result:

![](https://i.imgur.com/d3PvPwM.png)

I would like to know how to solve this with `matplotlib.pyplot`.
