How it works...

We begin by importing argparse along with the newly installed simplekml and PIL libraries. For this example, we will only need the Image and ExifTags.Tags classes from PIL.

from __future__ import print_functionimport argparsefrom PIL import Imagefrom PIL.ExifTags import TAGSimport simplekmlimport sys

This recipe's command-line handler accepts one positional argument, PICTURE_FILE, which represents the file path to the photo to process.

parser = argparse.ArgumentParser(    description=__description__,    epilog="Developed by {} on {}".format(", ".join(__authors__), __date__))parser.add_argument('PICTURE_FILE', help="Path to picture")args = parser.parse_args()

After configuring these arguments, we specify two URLs, gmaps and open_maps ...

Get Python Digital Forensics Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.