Earthquake KML Streaming

From fmepedia

fme_server_related_content.png (http://fmepedia.com/index.php/Category:FME_Server)

The great thing about FME Server is that you don't even need to have FME (Desktop) installed on your computer to make use of it. This opens up data distribution to all of an organization, with only Server authors and administrators using FME Workbench.


Run it live (http://fmeserver.com/fmedatastreaming/translate/Samples/earthquakesextrusion.fmw)


Table of contents



Description

This is an example of data streaming using FME Server. You don't need to have FME installed on your system to run this example.

Our FME Server demo site, fmeserver.com, has a workspace uploaded that reads a live feed of earthquake data from the USGS (GeoRSS format) and writes to KML. The output is opened with Google Earth as a means to visualize the GeoRSS data.



How it Works

A workspace was created which reads from GeoRSS and writes to KML format.

Using the FME Server functionality in FME2008 Workbench, the workspace was uploaded to our FME Server demo installation. During the upload it was registered as a Data Streaming (http://www.fmepedia.com/index.php?title=FME_Server_Services&rcid=11271#Data_Streaming) service. This means that it can be used as a live feed direct into another application. In this case the MIME type is registered so as to open the output automatically in Google Earth.

The transformation part of the workspace converts the point features returned by the GeoRSS into extruded circles to give a better visualization. The height of the extrusion is relative to the magnitude of the earthquake.



Above: The request goes from browser to FME Server via an FME Service.



Running the Example Workspace

Although you could visit the FME Server web pages, download the workspace and run it in FME Workbench, the idea of a data streaming service is to automatically provide a dataset for another application.

So, if you click on this URL or enter it into a web browser:

http://fmeserver.com:80/fmedatastreaming/translate/Samples/earthquakesextrusion.fmw

...you'll make a call to FME Server, which will carry out a translation, convert the data to KML, and stream it straight into Google Earth on your computer.


NB1: Obviously you'll need Google Earth installed to make use of this example!

NB2: Even though the URL ends in .fmw, it isn't a workspace. It's a service that returns KML data. So don't try using this as a workspace to open in FME Workbench! It doesn't even crash spectacularly, so there's no point in trying it from that point of view either!



Output


Above: The data as viewed in Google Earth.

Note that the output is showing the results of processing a live feed, so the data will appear different each time you use it.



Possibilities

The source data doesn't need to be a live feed (as it is in this example). It can be any source data that you have on your system and that FME Server has access to. This means any person in your organisation can view your source data - in Google Earth - immediately, and without having to have FME installed.

Also, you can use more than one source dataset, in effect creating a Google Earth mashup with very little effort.

For example, you could merge a set of delivery routes with a live traffic alert feed (http://developer.yahoo.com/traffic/rss/V1/index.html) to show where a delivery schedule could be interrupted by traffic congestion.



Q+A

Q) In what way is this different to a Data Download or a KML Network Link service?

A) Excellent question. There are many FME Server services available and sometimes the differences between them can be very subtle.

At first glance this looks like a KML Network Link – but in this case we are reading the data rather than a link to the data. Therefore this will not update automatically as a network link would.

For this example this is fine, because the earthquake source data is not being refreshed often enough for us to need to update it automatically. Other applications - for example tracking the progress of a vehicle by its GPS output - would benefit by using a Network Link service.

This example also looks similar to a KML data download, but the service here returned the KML data directly and opened Google Earth automatically, whereas a data download would merely have returned a link to the data via a web page and left it up to the user to handle.

But that's OK. As noted, there are many FME Server services available, and you should choose the one that most closely fits your need.

Attached Files
filesizedate
earthquake.jpg156.3 kB06/12/08
index.php------
register.php------
server.jpg14.8 kB06/12/08
User Comments Add a new comment