% Template For OSGeo Journal
% Language: Latex
% See article_long.tex for more examples, including use of urls, code examples, etc.

% Head

\title{Web--based Participatory GIS with data collection on the field -- A prototype architecture}
\subtitle{}
\author{by Maria Antonia Brovelli, Marco Minghini and  Giorgio Zamboni 

\medskip
\noindent{Politecnico di Milano -- DICA, Italy. \\
\email{maria.brovelli@polimi.it}}}

\maketitle

\subsection*{Abstract}

The rise of Web 2.0 and the current, unprecedented diffusion of mobile devices have laid new
foundations for the development of PGIS (Participatory GIS). This study evaluates the possibility of exploiting FOSS
(Free and Open Source Software) tools to build up a PGIS prototype providing Web publication of user field-collected
data. Besides increasing public awareness and collaboration, user-generated content should also enlarge the knowledge
of specific phenomena up to the local level. A prototype architecture was designed and tested in relation to a simple,
planning-related case study, i.e., the report of road pavement damages. Open Data Kit suite was used to gather
georeferenced multimedia data using mobile device sensors (e.g., the GPS) and to store them into a PostgreSQL database
with PostGIS spatial extension. Data was then Web-published using GeoServer. Web access was finally enabled from both
traditional desktop-computers and mobile platforms through ad hoc OpenLayers and Leaflet client-side solutions. The
architecture provided support for FOSS applicability within the typical PGIS-related tasks, from field survey to data
storage, management and dissemination on the Internet. This bottom-up communication paradigm, which exploits real-time,
freely available user contributions, can become a potentially precious tool for making decision-processes more
democratic, faster and ultimately better.

\textbf{Keywords: }
WebGIS, GeoWeb, Web Mapping, FOSS, Mobile, PGIS.


\section{Introduction}

{The dissemination and sharing of geospatial information on the Web has recently known a tremendous
impulse. After the rise of Web 2.0 (O'Reilly 2005), Internet communication paradigm evolved from the traditionally
top-down, centrist approach (typical of Web 1.0) to a collaborative, bi-directional model, where users are no longer
pure consumers but can also interactively create and share contents (Rinner et al. 2008). The Open Geospatial
Consortium (OGC) standards for Web mapping interoperability (Peng \& Tsou 2003), together with the non-stop development
driven by AJAX (Asynchronous JavaScript and XML) technology, spread this revolution to the field of geographic
applications known as Geospatial Web. As a consequence, the terms GeoWeb 2.0 (Maguire 2007) and Web Mapping 2.0 (Haklay
et al. 2008) were coined in order to identify the new era of dynamic, interactive tools allowing user participation in
managing spatial data. Other concepts introduced after the dawn of GeoWeb 2.0 were neogeography (Turner 2006), i.e., the
creation of customized maps through mash-ups of multiple data sources, and VGI (Volunteered Geographic Information),
i.e., the idea of humans behaving like sensors able to register geospatial }{contents. A final,
remarkable boost to this new era of Web mapping was given by the tremendous spread of mobile devices, provided with
sensors (e.g., cameras and GPS receivers) able to collect georeferenced data and a network connection to immediately
publish it on the Web. }

{The paradigm of Participatory GIS (PGIS) or Public Participation GIS (PPGIS), born in the mid-1990s to
define the use of GIS as a tool for promoting citizens' intervention in decision-making processes, found an incredibly
fruitful ground in the developments of GeoWeb 2.0. The focus of literature research on PGIS, which is generally related
to planning disciplines (Sieber 2006), has therefore dramatically changed in the last two decades. First studies
addressed the social and critical role of PGIS (Elwood 2006), paying little attention on the GIS technical aspects.
Almost all these applications were desktop-based (e.g., Oliveira et al. 1999) or even paper-based (e.g., Brown \& Reed
2000) and simply consisted in getting the public informed about the results of some GIS analysis. Technological
developments of Web 2.0 allowed the use of proprietary APIs (Application Programming Interfaces), especially the Google
one, for creating interactive Internet applications where users could enter and share customized information (e.g., Bugs
et al. 2010, Brown et al. 2012). The use of Open Source Web Mapping tools is still today quite limited due to their
higher required skills with respect to APIs (Boroushaki \& Malczewski 2010) and only occurred in few literature studies
(e.g., Hall et al. 2010). Finally, a growing number of applications (both proprietary and Open Source) have been
developed, which allow to Web-access and visualize georeferenced information collected in situ from mobile devices
(e.g., Maisonneauve et al. 2010). }



\section{Methodology}

The purpose of this research is to contribute to the literature on PGIS by using Free and Open Source
Software (FOSS) in order to design a participative system architecture able to: a) allow citizens to exploit their
mobile devices for collecting geotagged multimedia data (e.g., images, audios and videos) on the field; b) store and
manage data into a spatial database and publish it on the Web through OGC standard protocols; and c) set up client
interfaces for data visualization on both desktop and mobile devices. 


\bigskip
% The following is used for inserting an image
\begin{figure}[htpb]
   \centering
   \includegraphics[width=1\textwidth]{foss4g2013papers/32-Minghini/figs/fig1.png}
   \caption{Architecture of the system.}
   %\label{fig:figure_label}
\end{figure}

The prototype implemented architecture, divided into the server and the client sides, is shown in
Figure 1. Data collection on the field was achieved through the Open Data Kit (ODK) suite
(\url{http://opendatakit.org/}), which provides a modular
framework for building specific questionnaires, compile them on the field using Android devices and send them to a
PostgreSQL database server
(\url{http://www.postgresql.org/}). Thanks to PostGIS
(\url{http://postgis.net/}), the PostgreSQL spatial extension,
attributes can be extended with data geometries and can be read by GeoServer
(\url{http://geoserver.org/}) for Web-publishing as WMS
layers. Three viewers finally allow data visualization and querying. The first one was thought for traditional
desktop-computers and was built with OpenLayers
(\url{http://openlayers.org/}). The second and the third
ones are instead optimized for mobile devices and are based on Leaflet
(\url{http://leafletjs.com/}) and on the OpenLayers mobile
version coupled with jQuery Mobile
(\url{http://jquerymobile.com/}). 

The applicability of the described FOSS architecture was tested in relation to a simple, local
planning issue, i.e., the management of field-collected data concerning reports of road pavement damages. In order to
classify these damages, the catalog provided by the Direzione Generale Infrastrutture e Mobilit\'a (\textit{General Head Office for Infrastructures and Mobility}) of Lombardy
Region, Italy, was used (Regione Lombardia 2005). This document sorts pavement deterioration phenomena into three
categories: instability influencing pavement surface, instability influencing pavement regularity and cracking. In
addition, according to specific qualitative and quantitative considerations, a severity degree equal to low, medium or
high can be attributed to the events belonging to each category. 

The Build module of ODK suite was first used to design the questionnaire. Users are asked to provide
basic information such as the survey date and the address of the pavement damage location. They have then to choose the
category corresponding to the damage event and assign it a severity degree equal to low, medium or high. Finally, users
are asked to register their current position (using e.g., the device GPS) and to take a picture of the deterioration phenomenon. The ODK Aggregate module,
deployed on an Apache Tomcat server
(\url{http://tomcat.apache.org}) backed with a
PostgreSQL database, allows then to import and store the questionnaire template created with the Build component. ODK
Aggregate allows also to create users and manage their privileges (e.g., to collect data on the field, to view and
export data from ODK Aggregate, to upload and delete forms and to manage user permissions). Finally, the ODK
client-side Collect module allowed to perform data collection on the field. It consists of an application running on
Android devices and synchronized to the Aggregate component. After logging in, users can download the questionnaire
template from the ODK Aggregate server, fill the questionnaire on the field and send back the finalized questionnaire
to ODK Aggregate.  
Figure 2 depicts some steps of the questionnaire compilation on an Android smartphone. The survey was
addressed to randomly-selected citizens, who were provided with the instructions on how to use the ODK Collect
application. 

\medskip
% The following is used for inserting an image
\begin{figure}[b]
   \centering
   \includegraphics[width=1\textwidth]{foss4g2013papers/32-Minghini/figs/fig2.png}
   \caption{Screenshots of the Android ODK Collect application for reporting pavement damages, showing
(a) the choice of the event severity degree, (b) the event position registration using GPS, (c) the event picture taken
with the device camera.}
   %\label{fig:figure_label}
\end{figure}

User submitted contents, stored into the PostgreSQL database server, become then available into a
Web-based graphical application provided by the ODK Aggregate module. Data is organized in a tabular structure, where
each submission corresponds to a row and each attribute to a column. Multiple additional attributes (such as the
submission identifier, the submission start time and end time) are also added by default from ODK but are not needed
for the purpose of the study. For this reason, using also PostGIS for building the geometrical point features, a custom
SQL view was created, in order to extrapolate from the previous table only the attributes of interest. Due to its ease
of use as well as its certified WMS performance (McKenna 2011), GeoServer was then chosen for publishing the resulting
PostGIS vector data as a WMS layer.

Exploiting the OGC Styled Layer Descriptor (SLD) standard (Open Geospatial Consortium
2007), two layer styles were created within GeoServer. The first represents the pavement damage points with flags of
different colors according to the event severity degree: green for low degree, yellow for medium degree and red for
high degree (see Figures 3 and 4). The second style shows instead the survey positioning precision, which is another
attribute recorded by ODK, as the radius of a semi-transparent circle drawn around the points. 

\medskip
% The following is used for inserting an image
\begin{figure}[htpb]
   \centering
   \includegraphics[width=1\textwidth]{foss4g2013papers/32-Minghini/figs/fig3.png}
   \caption{Visualization and querying of pavement damages WMS layer into the client for
desktop-computer users.}
   %\label{fig:figure_label}
\end{figure}

\medskip
% The following is used for inserting an image
\begin{figure}[htpb]
   \centering
   \includegraphics[width=1\textwidth]{foss4g2013papers/32-Minghini/figs/fig4.png}
   \caption{Visualization (a) and querying (b) of pavement damages WMS layer into the client for small-screen mobile devices.}
   %\label{fig:figure_label}
\end{figure}


Three viewers were finally created in order to optimize data visualization on desktop-computers,
tablets and smartphones. The first viewer exploits OpenLayers JavaScript library to provide data interaction on
traditional computers (see Figure 3). The WMS layer representing road pavement damages can be superimposed on different
base maps (e.g., OpenStreetMap, Google and the local Lombardy Region orthophoto). When clicking on a point, a WMS
GetFeatureInfo request is performed and the answer, i.e., the user field-collected information, is shown inside a popup.


Users accessing the viewer from a mobile device browser are automatically directed to one of two other
viewers according to the device type. For large-screen mobile devices (e.g., tablets), the Leaflet JavaScript library
was used to develop a viewer supporting touch-screen commands and providing again WMS GetFeatureInfo response inside a
popup. For small-screen devices (e.g., smartphones), a viewer based on the OpenLayers mobile version coupled with the
jQuery Mobile Web framework was developed (see Figure 4). Due to the limited screen dimensions, WMS GetFeatureInfo
results are now shown into a separate Web page. Some peculiar functionalities of mobile devices, e.g., the
representation on the map of the estimated position of the device, are also available within the viewer. The developed
mobile viewers were successfully tested on both Apple iOS and Android devices. 



\section{Conclusions and future outcomes}

This study investigated the development of a Web-based Participatory GIS (PGIS) providing access to
field-collected information. Exploiting the idea of participatory sensing (Burke et al. 2006), which conceives human
beings as a network of continuously-monitoring sensors, a sample of users was instructed on how to use their mobile
devices in order to gather georeferenced data related to road pavement damages. User-generated content was stored and
managed into a spatial database and then Web published as a WMS layer. Two main innovations can be pointed out with
respect to PGIS literature. The first is represented by system access from mobile devices, which allow to spatially
interact with data by means of touch commands. Ad hoc versions were developed for both the large-screen tablets and the
small-screen smartphones. Secondly, the implemented architecture was fully developed with Free and Open Source Software
(FOSS) tools, which proved to be suitable for the research objective. 

In accordance with the fundamental paradigm of PGIS, real-time citizen local knowledge provided a
precious means for dealing with decision-making processes in an effective way (Sieber 2006). On the other hand, data
collection on the field performed through the ODK Collect application pointed out some limitations. First, road damages
positions registered from the user GPS devices proved sometimes to be inaccurate. This was due to both the low
performance of the GPS receivers themselves and the non-matching between the survey position (i.e., the position from which the picture is taken) and the position of the photographed damage
phenomenon. In order to overcome these issues, as well as to allow users to perform field-data collection even without
a GPS-equipped device, an intervention on the Android ODK Collect code is planned, which provides users with an
interactive map where they can manually place the point of interest (or refine the GPS-estimated one). Finally, future
work should also extend data visualization to the third and the fourth dimension through the use of virtual globes
coupled with data spatiotemporal analysis. 

\section*{References}



\begin{footnotesize}
%\begin{thebibliography}{99}

\begin{description}

\item[] 
{Boroushaki, S. \& Malczewski, J. (2010), `ParticipatoryGIS.com: a WebGIS\-based collaborative
multicriteria decision analysis', }\textit{{Journal of the Urban and Regional Information Systems
Association }}{22 (1), 23--32. }

\item[] 
{Brown, G. \& Reed, P. (2000), `Validation of a forest values typology for use in national forest
planning', }\textit{{Forest Science }}{46 (2), 240--247. }

\item[] 
{Brown, G., Montag, J. M. \& Lyon, K. (2012), `Public Participation GIS: A method for identifying
ecosystem services', }\textit{{Society \& Natural Resources }}{25 (7), 633--651. }

\item[] 
{Bugs, G., Granell, C., Fonts, O., Huerta, J. \& Painho, M. (2010), `An assessment of Public
Participation GIS and Web 2.0 technologies in urban planning practice in Canela, Brazil',
}\textit{{Cities: The International Journal of Urban Policy and Planning }}{27 (3),
172--181. }

\item[] 
{Burke, J., Estrin, D., Hansen, M., Parker, N., Ramanathan, S., Reddy, S. \& Srivastava, M. B. (2006),
Participatory Sensing, }\textit{{in }}{{}`Workshop on World-Sensor-Web (WSW'06):
Mobile Device Centric Sensor Networks and Applications (Boulder, October 2006)', Boulder, CO, 117--134. }

\item[] 
{Elwood, S. (2006), `Critical Issues in Participatory GIS: Deconstructions, Reconstructions, and New
Research Directions', }\textit{{Transactions in GIS }}{10 (5), 693--708. }

\item[] 
{Haklay, M., Singleton, A. \& Parker, C. (2008), `Web Mapping 2.0: The Neogeography of the GeoWeb',
}\textit{{Geography Compass }}{2, 2011--2039. }

\item[] 
{Hall, G. B., Chipeniuk, R., Feick, R. D., Leahy, M. G. \& Deparday, V. (2010), `Community-based
production of geographic information using open source software and Web 2.0', }\textit{{International
Journal of Geographical Information Science }}{24 (5), 761--781. }

\item[] 
{Maguire, D. J. (2007), GeoWeb 2.0 and Volunteered GI, }\textit{{in
}}{{}`Workshop on Volunteered Geographic Information', University of California, Santa Barbara,
104--106. }

\item[] 
{Maisonneauve, N., Stevens, M. \& Ochab, B. (2010), `Participatory noise pollution monitoring using
mobile phones', }\textit{{Information Polity }}{15 (1), 51--71. }

\item[] 
{McKenna, J. (2011), `WMS Performance shootout 2011', Denver, FOSS4G 2011. URL:
}\url{http://www.slideshare.net/gatewaygeomatics.com/wms-performance-shootout-2011}
(Last checked May 2013). 

\item[] 
{Oliveira, M. P. G., Medeiros, E. B. \& Davis, C. A. Jr. (1999), Planning the acoustic urban
environment: a GIS-centered approach, }\textit{{in `}}{Proceedings of the 7th
International Symposium on Advances in Geographic Information Systems (Kansas City, 2-6 November 1999)', Kansas City,
USA, 128--133. }

\item[] 
{Open Geospatial Consortium (2007), }\textit{{Styled Layer Descriptor profile of the
Web Map Service Implementation Specification}}{, Version 1.1.0 (revision 4), OGC 05-078r4 . URL:
}\url{http://portal.opengeospatial.org/files/?artifact_id=22364} (Last checked May 2013). 

\item[] 
{O'Reilly, T. (2005), `What is Web 2.0: Design patterns and business models for the next generation of
software'. URL: }\url{http://oreilly.com/pub/a/web2/archive/what-is-web-20.html} (Last checked May 2013). 

\item[] 
{Peng, Z. R. \& Tsou, M. H. (2003), }\textit{{Internet GIS}}{,
Hoboken, NJ, John Wiley \& Sons. }

\item[] 
{Regione Lombardia -- Direzione Generale Infrastrutture e Mobilit\'a (2005),
}\textit{{Catalogo dei dissesti e delle pavimentazioni stradali, ALLEGATO B}}{,
d.g.r. n. 1790/2006, BURL n. 8 S.S. Del 21.2.2006. }

\item[] 
{Rinner, C., Ke{\S}ler, C. \& Andrulis, S. (2008), `The use of Web 2.0 concepts to support deliberation
in spatial decision-making', }\textit{{Computers, Environment and Urban Systems
}}{32, 386--395. }

\item[] 
{Sieber, R. (2006), `Public Participation Geographic Information Systems: A Literature Review and
Framework', }\textit{{Annals of the American Association of Geography }}{96 (3),
491--507. }

\item[] 
{Turner, A. (2006), }\textit{{Introduction to Neogeography}}{,
Sebastopol, CA, O'Really Media Short Cuts. }


%\end{thebibliography}



\end{description}


\end{footnotesize}



\endinput
