Photo Map Creator is a small tool written in Python 3. It parses a photo directory and creates an HTML document that shows all GPS positions within an embedded map. We use OpenLayers to render maps.
The following screenshot shows an example output. A corresponding HTML document can be found in this repository here.
Python 3 must be installed in order to run Photo Map Creator. Furthermore you need at least the first of the following dependencies:
gpsphoto
: Install it viapip3 install gpsphoto piexif exifread pillow
.exiftool
: This dependency is optional. It is only needed, if you like to process non-JPEG input images (e.g. Apple HEIC). Install it in Linux viasudo apt-get exiftool
.
You can run Photo Map Creator by either CLI or GUI. The output is always written into the maps/
directory.
python3 photo-map-creator.py OUTPUT_FILENAME GPS_LATITUDE GPS_LONGITUDE ZOOM PHOTO_DIRECTORY
The parameters are given below:
OUTPUT_FILENAME
: Name of the output file. The postfix.html
added by the tool.GPS_LATITUDE
: Signed decimal Latitude for the initial view. If0.0
is given, that the latitude from the first photo is taken.GPS_LONGITUDE
: Signed decimal Latitude for the initial view. If0.0
is given, that the Longitude from the first photo is taken.ZOOM
: Zoom value for the initial view. E.g. 15PHOTO_DIRECTORY
: Path to your photos.
Example:
python3 photo-map-creator.py amsterdam 52.3667 4.8945 15 /Users/andi/Pictures/2019/Amsterdam
Start as follows:
python3 photo-map-creator.py
The set of parameters is same as with the command line interface, but set by textfields and a directory dialog.