Cluster Algorithm Operations and Requests

27

5.5 WPS for Social Media

GIS.FCU implemented a WPS 2.0 instance based on GeoServer 5 . GeoServer is a Java based GIS web server. Applications can publish geospatial data easily by the functions and GUI built in GeoServer. The latest version of GeoServer is 2.7.1 and it supports various OGC standards, including WFS, WCS, WMS, WMTS, TMS and WPS. An algorithm for spatially clustering Social Media contents has been implemented. The operations GetStatus, GetResult and Dismiss were implemented in the latest version of the GeoServer WPS that supports the WPS 2.0 standard as well as a RESTful binding.

5.5.1 Cluster Algorithm

The DBSCAN Density-Based Spatial Clustering of Applications with Noise algorithm was chosen for the spatial clustering of Social Media contents provided by the data sources SOS and GeoSPARQL endpoint. DBSCAN groups together points that are close to each other see Figure 5. The resulting clusters are provided as a result set of the WPS process. Figure 5 - DBSCAN illustration

5.5.2 Operations and Requests

Besides GetCapabilities and DescribeProcess, the Execute operation is the main entrance point for the algorithm. The identifier for the developed DBSCAN algorithm is “gs:SocialMedia”. 5 http:geoserver.org 28 “gs:SocialMedia” provides three parameters to calculate clustered social media data. 1. Keyword: filter parameter to extract data regarding a specific issue e.g. “storm” 2. Distance: the distance of radius for each social media data element to calculate the number of neighbors

3. Neighbors: the fulfilling condition if the number of social media data within

specific radius distance exceeds neighbors The Execute operation has three patterns based on different requirements: ฀ Get all social media data from SOS by sending request with null parameters. ฀ Get clustered social media data from SOS by sending request with distance, neighbors parameters. ฀ Get clustered social media data regards to specific issue from SOS by sending request with all parameters. The result is retrieved asynchronously via the GetResult operation. An exemplary result is illustrated in Listing 4. Listing 4 - Example of a WPS StatusInfo response ?xml version=1.0 encoding=UTF-8? wps:StatusInfo xmlns:ows = http:www.opengis.netows2.0 xmlns:wps = http:www.opengis.netwps2.0.0 xmlns:xsi = http:www.w3.org2001XMLSchema-instance xsi:schemaLocation = http:www.opengis.netwps2.0.0 http:schemas.opengis.netwps 2.0.0wpsAll.xsd wps:JobID 082be5b5-44aa-4e22-8a70-0f779c651d2d wps:JobID wps:Status Succeeded wps:Status cluster id = -1 cluster id = cluster id = 1 sensor id = 1 lat 37.771007 lat lng -122.412694 lng title Major Storm in San Francisco title sensor cluster wps:StatusInfo 29

5.6 Social Media Client