Snapshot of the Pack: Find elevation given city and country names

Downloaded from myExperiment website

Snapshot generated at 15:22:44 on Thursday, 21 November 2024

Pack Details

Title Find elevation given city and country names
Items 7
Created by Chrisser
Created at 03:06:29 on Thursday, 06 October 2011
Last updated at 04:15:33 on Thursday, 06 October 2011

Description

This pack contains the workflows and supplemental files that I created for a project in IST600 - eScience and eResearch Workflows.

This workflow accepts city and country names as user-supplied input. These value are supplied to the GetWeather webservice ( http://www.webservicex.net/globalweather.asmx?WSDL ), which returns an XML record of location and weather info for each recognized city. (See the uploaded photo "weather example")

The XML returned from GetWeather is then searched using regular expressions for the geogrpahic coordinates. Because the  coordinates are returned in a different format (with a hyphen) than is required for the next web service (with a period), a lot string-wrangling needs to happen in order to format the coordinates as is needed while not loosing values along the way. All of this happens in the two additional workflows embedded in the main workflow, and which have been uploaded with the titles "latitudewithbeans" and longitudewithbeans". The names reference the fact that in each workflow netbeans scripts had to be edited in order to produce the required output.

From the two nested workflows, the output is two lists - one of latitude coordinates, one of longitude coordinates, both ordered to reflect the order in which the cities were originally entered. These lists are then supplied as inputs for a REST Service that I've configured to use the STRM webservice from geonames.org to fetch an elevation for supplied latitude and longitude coordinates ( http://www.geonames.org/export/web-services.html#srtm3 ).

Because I've designed the workflow to pass blank values when cities are not recognized, another customized regular expression matching beanshell must follow the REST Service to catch any errors thrown from blank input values. Now, errors default to an elevation of -450, lower than any actual city on earth.

Finally, elevations are output onto a bar chart which is labelled with the appropriate city names. Negative elevations print as an elevation equal to zero.

!! Rserve is required for this workflow. !!


Summary of Pack Items (7)


Downloaded Items (7)


Not Downloaded Items (0)

Packs within this pack (0)

None

External items (0)

None

Items that can be viewed, but not downloaded (0)

None

Items that cannot be viewed (0)

None