Stripping GPS Geotags from EXIF Data

Pretty straightfoward.

✔ ~/bin
$ git clone
 Cloning into 'exiftool'…
 remote: Enumerating objects: 727, done.
 remote: Counting objects: 100% (727/727), done.
 remote: Compressing objects: 100% (551/551), done.
 remote: Total 12272 (delta 443), reused 301 (delta 170), pack-reused 11545
 Receiving objects: 100% (12272/12272), 15.40 MiB | 12.58 MiB/s, done.
 Resolving deltas: 100% (10445/10445), done.

For instance, when checking some images I can see that there’s a ton of EXIF information in there, including the precise location where the image was taken:

✔ ~/blog
$ exiftool ./2019/11/IMG_20191111_2029432-825x510.jpg
 ExifTool Version Number         : 11.76
 GPS Version ID                  :
 GPS Latitude Ref                : North
 GPS Longitude Ref               : East
 GPS Altitude Ref                : Above Sea Level
 GPS Time Stamp                  : 19:29:43
 GPS Dilution Of Precision       : 16.132
 GPS Img Direction Ref           : Magnetic North
 GPS Img Direction               : 178
 GPS Processing Method           : fused
 GPS Date Stamp                  : 2019:11:11
 GPS Altitude                    : AA.A m Above Sea Level
 GPS Date/Time                   : 2019:11:11 19:29:43Z
 GPS Latitude                    : DD deg MM' SS.SS" N
 GPS Longitude                   : DD deg MM' SS.SS" E

Sanitize that.

✔ ~/blog
exiftool -gps:all= -r -overwrite_original -P -ext jpg .

This will remove the GPS data for all JPEG files in a folder and all subfolders.

Why Are My Backups So Slow?

I recently tested two portable disk drives to use for data backups but was appalled by how badly they performed. The drives would alternate between writing quickly (50 – 100MB/s) and stuttering to a halt (250 – 500KB/s), and I could not understand why.

Here’s what that looked like:

Task Manager showing super terrible disk transfer rates
Continue reading Why Are My Backups So Slow?

Field Of View Measurements

For some reason, when I was googling the Field of View (FOV) value for the Pixel 2 camera recently, I couldn’t find the answer.

So I thought back to high school trigonometry and measured it myself.

It’s not perfect, but it works:

Pixel 224.5cm32cm31.47°25.11°~63°~50°

I took a 30cm ruler and taped it up, then measured how far away the camera needed to be from the ruler to fit the whole thing just inside its Field of View.

d_h = the distance away from the ruler in landscape mode
d_v = the distance away from the ruler in portrait mode

This is what it looks like:

The trigonometry for a right angle triangle means that:

α_h = arctan(15 / d_h) = arctan(15 / 24.5)
α_v = arctan(15 / d_v) = arctan(15 / 32)

and obviously the full FOV_h and FOV_v are double that.

This works with any camera, so if you don’t have the sensor size and don’t want to run through the lens equation, try this method out instead.

Finally, a practical use for all that trigonometry I memorized in high school. (Ok, that’s not true, we used a ton of it in electrical engineering, too.)

In other words, all that the Field of View triangle is saying (and indeed what the tangent ratio is saying) is that:

If we’re holding the camera in landscape mode, then stepping forwards or backwards by 24.5cm will remove or add 30cm of the scene in front of us to the picture.

If we’re holding the camera in portrait mode, then stepping forwards or backwards by 32cm will remove or add 30cm of the scene in front of us to the picture.