ESRI_Picasa_Preso
Download
Report
Transcript ESRI_Picasa_Preso
Got Pics?
More Ways to
Make Your
Friends Jealous
Through
Publishing Your
Geotagged
Photos
Nancy Milholland
Introduction
• Graduate Student in GIS Master of Science
program at USC
• Software development and IT positions usually
related to Configuration Management at
companies ranging from a robot and vision
systems firm to Genentech, a biotech company
producing drugs to meet serious unmet medical
needs
• Programming useful but not main focus of work
• Introduction to Python, Model Builder, and C#
class project
Contents
•
•
•
•
•
•
•
•
•
Requirements
Workflow and tools for data creation
What is NMEA; NMEA to shapefile or feature set
Picasa and Google API
Tkinter
ArcGIS Online
Demo
Incorporating other social media
Resources
Requirements
GPS Logger file
+
Geotagged
Picasa
Photos
• GPS log file showing
walk or trip in NMEA
format
• Geotagged photos
stored on line in
Picasa
• Bring both together
in a map that can be
easily shared with
friends
• Python and
ArcToolbox
Workflow
•
•
•
•
•
•
•
•
•
Go on a cool trip
Capture hike using GPS logging device
Take pictures on hike
Geo-locate pictures and add metadata
such as captions
Upload to online photo management
system such as Picasa
Create shapefiles for hike and pictures
Upload to ArcGIS online and configure
Share with friends! Make them
jealous!
Wish you were back in France
Capturing a Trip and Geotagging
Photos
• Geo-logger AMOD AGL3080
• GPS-based data logger designed
to provide location information
for digital photos
• Plug into USB port and access like
an external drive
• Creates text file for trip in NMEA
format
• Use to encode GPS location in
EXIF metadata of photos taken
on trip
Geocode Photos with Aperture
EXIF: Exchangeable Image File Format
• Wikipedia: Standard that
specifies formats for
images, sound, and tags.
Upload to Picasa
What is NMEA?
•
•
•
NMEA: National Marine Electronics Association specification defining the
interface between marine elctronic equipment
http://www.nmea.org
http://www.gpsinformation.org/dale/nmea.htm
GPGGA
Convert NMEA to SHP
• Inputs
– Workspace to add new
shapefile or feature class
– Location of NMEA log
– Output Name
– Name for trail
– Description
• Outputs shapefile or
feature class
• Uses python 2.7 and
ArcMap 10.1 or python
2.6 and ArcMap 10.0
• Install Toolbox with
python scripts in
ArcCatalog
Mapping Picasa Pictures
• Script uses Picasa Python API,
version 2.0.17, Python 2.7, and
ArcMap 10.1 or Picasa Python
API, version 2.0.16, Python 2.6,
and ArcMap 10.0
• The Picasa libraries must be
downloaded from Google,
installed and the gdata folder
placed in the user’s python path.
• Inputs
– Workspace to add new
shapefile or feature class
– Output Name
– Picasa User name
• Outputs shapefile or feature class
Problem – What Album Do I want?
• What is the album name?
• Don’t know name until after script
starts running and have looked up
albums belonging to user.
• How do you create a second
interaction to provide input to script
based on script processing?
• The Tkinter module ("Tk interface")
is a Python interface to the Tk GUI
toolkit from Scriptics
Point feature set or shapefile of Picasa
pictures
ARCGIS Online
• Create zipped files from trail
and picasa photo shapefiles
• Logon to ArcGIS online –
either general or
organization account
• Create a new or use existing
map
• Add zip files
• Adjust symbology
• Configure Popups
• Save, make public, and share
link as url or embedded html
Other Social Media
• APIs such as Flickr, Instagram, Panoramio, etc vary
– API key
– Query filters – can you combine time, geolocation extent, user,
keyword in a single query
– EXIF information
• Create http query that returns json and parse json to get pictures
– https://api.instagram.com/v1/tags/sfart/media/recent?
References: Tkinter
• Tkinter
– http://wiki.python.org/moin/TkInter
– http://www.pythonware.com/library/tkinte
r/introduction/
– http://effbot.org/tkinterbook/listbox.htm
Google/Picasa API
• Developer’s Guide and Libraries
– https://developers.google.com/picasaweb/docs/1.0/developers_guide_python
– https://developers.google.com/picasaweb/code
– https://code.google.com/p/gdata-pythonclient/downloads/list
Python Path Examples
• Example 1.
–
–
–
–
C:\Python26\gdata –install location of Google API library
>>> import os
>>> os.environ['PYTHONPATH'].split(os.pathsep)
['C:\\Python26', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.0\\bin',
'C:\\Program Files (x86)\\ArcGIS\\Desktop10.0\\ArcPy', 'C:\\Program
Files (x86)\\ArcGIS\\Desktop10.0\\ArcToolbox\\Scripts']
• Example 2
– python setup.py install – see install instructions with library – installed
in site-packages in 2.7
– >>> import os
– >>> os.environ['PYTHONPATH'].split(os.pathsep)
– ['C:\\Python27', 'C:\\Python27\\ArcGIS10.1\\Lib\\site-packages',
'C:\\Python27\\ArcGIS10.1']
Code and Contact
• Code is online at
http://www.arcgis.com/home/item.html?id=b9e
7969d52514e7c95aa23af16959f75
• Twitter: nmilhollandgis
• Email: [email protected]