This presentation shows an FME workspace which reads USGS ShakeMap earthquake data from a geojson feed and clips California ZIP code boundary data to produce an output containing ZIP, City and MMI (shaking intensity) which is then automatically emailed to a list of recipients via FME Cloud.
2. About me
Senior Technical Officer in the School of Geography, Planning and
Environmental Policy, University College Dublin from 2002-2011
Moved to California in 2011. Have worked for Robert Half Technology at the
California Earthquake Authority since 2012.
Started as Support Analyst now Spatial Data Architect.
Received MSc in GIS in 2015
Started using FME in 2015
Stephanie Halpin
MSc Geographic Information Technologies,
GISP
3. Background
Insurance coverage for earthquake damage is not
covered by a homeowner (or renter, condo,
mobilehome) policy
California Earthquake Authority is a publically
managed, privately funded, non-profit insurance
company offering affordable earthquake coverage in
California
Set up in 1997 after the damaging effects of Loma
Prieta (1989) and Northridge (1994) earthquakes
5. Requirements
• Automatically retrieve USGS ShakeMap data
immediately after an earthquake
• Overlay the ShakeMap and ZIP codes to
produce output containing ZIP code and it’s
corresponding MMI (shaking intensity) value
• Automatically email this result within minutes
of the earthquake
6. USGS notification email sent
to
usgsfeedreader@gmail.com
FME Cloud Service
Checks the email
account
every 15 minutes
Run FME
workspace to
retrieve ShakeMap
data and overlay
with ZIP codes
Keep
checking
every 15
minutes
Earthquak
e
Earthquake network
sensors record shaking
in California &
ShakeMap is generated
new email?
No
Yes
7. Retrieve ShakeMap data
Write to an excel file
to email to recipients
Read the USGS
geojson earthquake
feed and test for
the following:
> = Mag 5
Yes
In California
No
Yes
Don’t need it
Don’t need it
California ZIP codes
CLIP
No
Workspace steps…..
10. Step 1
• Read GeoJSON feed and
test the results
• FeatureReader looks at
GeoJSON ‘detail’ for
those that passed
Step 2
• Cleanup JSON
• Flatten ‘products’ expose
url for ShakeMap data
• Keep attributes for output
11. USGS ShakeMap with Modified Mercalli Intensity
ShakeMap for Napa/
American Canyon Earthquake
August 24th 2014
ShakeMap data, we are interested in
GRID_CODE in the MMI shapefile
12. Step 3
• Read ShakeMap
• Filter data, only MMI 5+
(Moderate Shaking) are
kept for the clipper
Step 4
• Clip California ZIP codes
• Use attribute pivoter to
keep only one row per ZIP
with Max MMI value
13. Step 5
• Output excel file
• One sheet per
earthquake!
• ZIP, City, MMI, ZIP type,
USGS ID
Step 6
• Generate Email
• Workspace runs in FME
Cloud, attaches excel file
and emails to recipient
list
14. Trigger
USGS notification
email to gmail
account
Send Email
With excel attachment
Workspace Runs
EVENT
Publisher SubscriberWorkspaceReceive
Topic
Send
Topic
Workspace subscribes to
incoming publication
(email to gmail account)
Workspace publishes to the
subscriber (send
attachment to recipient)
Inbound
Kicks off workspace
Outbound
Kicks off messaging
FME Cloud Notification Service
15. FME Cloud Configuration
When publishing
register the workspace
with both:
Job Submitter
and
Notification Service
16. FME Cloud Configuration
Subscribe to Publication
(RECEIVE_EMAIL Topic)
Publish to Subscription
(SEND_EMAIL Topic)
Attachment specified in FMEServerEmailGenerator transformer
in the workspace
17. Email inbox:
USGS Notification arrived at 7:38 am on Sunday 1/24
Workspace generated excel file arrived at 7:39 am on Sunday 1/24
Result: