{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Collecting GPS coordinates from photo metadata\n", "\n", "For orientation: \n", "This page is the main panel and to the left you should see a 'file browser' panel listing some folders and files, including this one. You may need to click and drag the border in between the two panes in order to better see the names. In particular you want to look for a folder icon next the name 'PUT_PHOTOS_HERE'.\n", "\n", "**Follow the steps below.**\n", "\n", "----------------------" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## PART 1: Upload the photos and collect the data\n", "\n", "1. Double-click on 'PUT_PHOTOS_HERE' folder icon in the file browser panel to the left of this page. That will drop the navigation into the empty folder.\n", "\n", "2. Drag-and-drop all the photos into the empty file browser panel to the left of this page. (A gray dashed line will appear around the edge of the file browser when drag the file onto the file browser pane & at this point you can drop a file or files in by releasing the mouse button.)\n", "\n", "3. Give the photos time to upload.\n", "\n", "4. At the top of the panel where you just dragged the photos & to the left of the 'PUT_PHOTOS_HERE' text, click on the `Home` icon to go back up to the level above the photos files in the file heierarchy.\n", "\n", "5. Click in the next cell and execute the commands in it by typing `shift-return` (or hit the `play` icon the menu at the top bar of this page)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "output_file = \"coords.tsv\"\n", "#The following command is based on Phil Harvey's answer on January 20, 2011, 07:30:32 PM, &\n", "# comment on on: January 20, 2011 to add the -n option, from\n", "# http://u88.n24.queensu.ca/exiftool/forum/index.php?topic=3075.0\n", "!exiftool -filename -gpslatitude -gpslongitude -T -n PUT_PHOTOS_HERE > {output_file}\n", "# add column names\n", "!sed -i '1ifile_name\\tlat\\t\\long' {output_file}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "It should generate a file named `coords.tsv` & after a few seconds to let the file browser panel refresh itself, you should now see it listed among the files in the file browser panel. \n", "\n", "View the extracted data by double-clicking *TWICE* on the `coords.tsv` icon. Alternatively, you can open it by right-clicking on it and selecting to 'Open With' > 'TSVTable'.\n", "\n", "## PART 2: Bring the data onto your computer\n", "\n", "Right click on `coords.tsv` in the file browser panel, select 'Download' to save the file to your local system. \n", "\n", "Next, you should be able to directly open this file from within your favorite spreadsheet program, Excel or Google Sheets, and it should automatically open with the correct labels and values in the right cells. In other words, it should look much like when you viewed in the 'TSVTable' view earlier. It is suggested that you now save it as a spreadsheet file and discard the tsv if you are going to do any further editing in the spreadsheet program.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---- \n", "\n", "----" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }