DEVELOPMENT AND COMPARISON OF OPEN SOURCE BASED WEB GIS FRAMEWORKS ON WAMP AND APACHE TOMCAT WEB SERVERS

.


INTRODUCTION
GIS provide data visualization, data creation, data integration from several sources, editing, query, map creation and storage functions (Teodoro and Duarte, 2013). In its native state, GIS was monolithic and platform-dependent that gradually evolved to desktop GIS. In early 1990's Web came into picture when Tim Berners-Lee invented World Wide Web along with hypertext markup language, hypertext transfer protocol (HTTP) and uniform resource locator at CERN (European Organization for Nuclear Research).
Web had stupendous impact in the computing world. Web GIS has adapted GIS in the Web environment. It has added new dimensions in the growth of GIS as large and complex GIS applications have become available to common public through the Web. In 1993, Web based map viewer was developed at Palo Alto Research Center (PARC) by Steve Putz which was the first remarkable work in the evolution of Web GIS. After that many new releases related to Web GIS took place like online version of the National Atlas of Canada, Alexandria Digital Library, National Geospatial Data Clearinghouse portal, TIGER (Topologically Integrated Geographic Encoding and Referencing), MapQuest's Web mapping application etc. In 1999, Web 2.0 was released which empowered the Web GIS by the development of Google Maps, Google Earth, Microsoft Bing Map etc. The AJAX (Asynchronous JavaScript and XML) which was released in 2005, also effected the Web applications of GIS. AJAX has improved the page display by removing the stop-start nature of interactions . The integration of GIS and internet technology has revolutionary effects like interactive access to geospatial data, real time data integration and transmission, access to platform-independent GIS analysis tools etc (Karnatak et al., 2012).
Low cost, ease of availability and global reach are primary factors in the success of Web GIS application. These factors can be better achieved by the implementation of Web GIS using OSS. OSS has become the focus of GIS projects from last decade. OSS projects on Quantum GIS, PostGIS, OpenLayers, MapServer, GeoServer, uDig etc. have created momentum among users and developers as they are at par in functionalities and capabilities to their proprietary counterparts. Selection of these software is an initial and crucial step in the development of Web GIS framework as this effects its overall success. Therefore a critical comparison among the available software must be done by the developer prior to its selection for the development of Web GIS. This paper explores the software options for the development of Web GIS framework. The objective of the paper is to compare the Web GIS framework based on WAMP server with the one based on Apache Tomcat server. Also, to perform the literature review of Web GIS and OSS.

WEB GIS ARCHITECTURE
The Web GIS is a GIS that uses Web technology. In general Web GIS application have Web browser as a client, for sending the request, and a Web server, for responding to the request. The non spatial Web applications usually contains only Web server but in case of Web GIS due to voluminous amount of data there is an additional server called data or map server. This server handles the data.
The generic layered architecture of Web GIS consists of three layers namely user interface layer, application layer and database layer. The clients access the system by interacting with the user interface layers that takes the input and shows the output of the system. It involves graphical user interface therefore it must be designed cautiously so that the user can understand it easily. The application layer provides the map visualization functions like panning, zooming etc. It provides the others functions also like layer selection, editing, querying etc (Lu, 2005). The database layer handles the data present at distributed sources. There are two types of architecture namely thin client and thick client depending upon the client processing power (Alesheikh et al., 2002).

Thin Client
In this the processing power lies in the server. On client side there is only an interface that communicates with the server and displays the results. No task is performed at the client side. The Web server is connect to GIS server through technologies like servlet, common gateway interface etc as shown in the figure1.
The server system has centralized control on all resources therefore it is easy to update. But user specific functions are not possible. This type of system is cheaper and easy to start but compromises from response time, local needs, advance data formats etc. It requires frequent communication with the server even for simple operations like zoom, pan as the client requires the completely processed data for display (Doutoral, 2004). Thus the transmitted data size is usually small.

Thick Client
In this client side contains GIS functionalities and it mainly requests for geographic data from server (Sugumaran and Sugumaran, 2007). This architecture empowers the client by using plug-in or other functionality as shown in the figure 2. Plug-ins helps to extend the functionalities of Web browser. Some of the commonly used plug-ins are Adobe Acrobat, Adobe Flash, Adobe SVG viewer, Apple Quicktime etc. In thick client architecture data and logic can reside locally on the client side. This results in lower frequency of data transmission as data can be stored at client. This also reduces the time delay caused due to frequent communication between client and server. But it need high internet speed as the server usually sends the raw or unprocessed data which is then processed at the client side. This architecture enables the browser to use vector data or high quality images. In this architecture updating task is difficult as it has to be done by each client themselves which sometimes become challenging due to security reasons or limited technical skill at the client end.

OPEN SOURCE SOFTWARE (OSS)
OSS have made the software available to all. According to Free Software Foundation, free software grants four freedoms. These freedoms are to run the program for any purpose, to study how the program works and adapt it to needs, to redistribute copies and the fourth one is to improve the program, and to release improvements to the public. Second and fourth freedom requires source code must be delivered with the software. In the paper (Steiniger and Bocher, 2009) four indicators are used to measure the popularity of Free and Open Source Software (FOSS) namely number of projects started in couple of years, financial support by the government in the development of FOSS GIS projects, download rate of software and number of use cases. There are several options available. Many of them are discussed in the paper (Steiniger and Hunter, 2013). Following open source software are used in the frameworks:

Apache Tomcat
It is an open source Web server and servlet container. Tomcat was the project of Sun Microsystems which was later handed to Apache Foundation. It is widely used for by the applications that are developed using JSP and servlets. Apache Tomcat serves a Web application implemented using the Model-View-Controller design, through the well-known frameworks Spring (for the model) and Apache Tapestry (for the View and the Controller) (Fustes et al., 2013).

WAMP
WAMP is an acronym for Windows/Apache/ MySQL/PHP. This stack provides developer an operating system, Web server, database and Web scripting software. The AMP stacks are also available for Linux and Macintosh operating systems, known as LAMP and MAMP respectively.

GeoServer
It is the J2EE realization of Open GIS Web server (Huang and Xu, 2011

PostgreSQL/ PostGIS
The processing and planning and other tasks of standard database while PostGIS provides spatial types, functions and indexes (Ramsey, 2011). PostGIS adds spatial data types like points, linestrings, polygons, multipoints, multilinestrings, multipolygons and geometrycollections. It supports both geometry and geography types. It also adds spatial functions like area, distance, union, difference, buffer, touches, intersects, within, contains, overlaps etc.

MySQL
MySQL is a relational database management system. It is a popular open source database that has large user base. It is very fast, reliable, and easy to use that can be used in both small and large scale applications. It has added some spatial support but can perform processing only on minimum bounding box instead of true geometry of the spatial entities (BostonGIS, 2009). Therefore many times it may not be suitable for sophisticated spatial applications.

Quantum GIS
Quantum GIS is a popular choice for desktop GIS. In 2002, a group of volunteers started Quantum GIS as an alternative to GRASS mainly for better graphical user interface and fast spatial data viewing for Linux based systems. It was programmed in C++ while its extensions can be written in C++ and Python (Steiniger and Bocher, 2009). It provides plug-ins that can be used to extend the functionalities. It supports a large range of vector and scalar formats like PostGIS, GRASS, Shapefile, WFS, WMS, GeoTiff, PNG, JPG etc. This software has been used in this work for creation of data. Figure 3 shows a screenshot of the Quantum GIS. Quantum GIS provides features like map navigation, attribute table, vector symbolisation, predefined point symbols, labelling of vector features by attribute, map editing, on-the-fly projection for vector layers, print composer, raster pyramids, spatial index etc (Hugentobler, 2008). As it provide variety of features and the plug-ins facility it is a good choice for the desktop GIS.

METHODOLOGY ADOPTED
In the present study, two Web GIS frameworks have been developed and implemented using OSS. Both these Web GIS frameworks have been conceptualised as three tier client/server architecture consisting of presentation tier, logical tier and data tier. Presentation tier is the top layer that displays information, logical tier performs the processing task and data tier stores the geographic data. A thin client has been adopted because of the added advantages like ease in updating data, negligible resource requirement at client side etc. In thin client all the processing tasks are performed by the server side while on the client side just a Web browser is required for communication and display of results.
Web server plays the pivotal role in the development of any Web GIS framework. It handles the HTTP request coming from the Web client and sends back HTTP response. In the present paper, two options for Web server have been explored for development and implementation of two different Web GIS frameworks and for their subsequent comparison. One framework has been implemented on WAMP server while the other one on Apache Tomcat server.
GIS server is an additional requirement in geospatial systems. The GIS server differs in: (1) the use of image graphics vs graphic objects, (2) the use of map prepublishing vs direct data access, (3) their client-level requirements, (4) the amount of geographic analysis accessible from the Web, (5) data and platform restrictions and (6) data format supported (Su, Slottow and Mozes, 2000). In the developed frameworks, GeoServer and ALOV have been used as GIS servers since Web based GIS applications usually require one more server apart from Web server for the handling of voluminous spatial data.
Quantum GIS has been used as GIS software for creation of geographic database and performing spatial analysis. PostgreSQL has been used as database management system with PostGIS that adds support for spatial types, indexes, and functions. In the framework based on WAMP, PHP codes are used which are common among Web developers of any stream. In the framework based on Apache Tomcat, servlet and JSP plays the major role in the development of fully fledged Web GIS. Compatibility among components like GIS server, spatial database etc., of the framework is also important. The detail of each framework is given below:

Framework based on WAMP
In this Web GIS framework, OSS used include WAMP server, ALOV, Quantum GIS, and MySQL. This framework's presentation tier uses PHP, logical tier consists of WAMP server and ALOV while data tier composed of MySQL.

Figure 4: Framework based on WAMP
The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XL-4, 2014ISPRS Technical Commission IV Symposium, 14 -16 May 2014 As shown in the figure 4, client can communicate with the WAMP server by sending it HTTP request which in sent to ALOV that can access MySQL database.

Framework based on Apache Tomcat
In this Web GIS framework, OSS used comprise of Apache Tomcat server, GeoServer, Quantum GIS, PostgreSQL and PostGIS. Apache Tomcat is an open source server and servlet container. It is used for the implementation of Java servlet and Java Server Pages (JSP) technologies. This framework's presentation tier used servlet and JSP. Its logical tier consists of Apache Tomcat server and GeoServer while data tier composed of PostgreSQL and PostGIS.

Figure 5: Framework based on Apache Tomcat
As shown in the figure 5, client can communicate with the Apache Tomcat server by sending it HTTP request. It then sends the request to GeoServer that can access PostgreSQL/ PostGIS database. The HTTP response is then send back to the client.

DISCUSSIONS
Both the frameworks are compared based on the following points:

Supported Operating System
Framework based on WAMP can run only on Windows operating system because of WAMP server. Framework based on Apache Tomcat can run on different platforms. This made it available to wider public as compared to framework based on WAMP because it is not restricted to any particular operating system.

Development Platform
Framework based on WAMP used PHP while framework based on Apache Tomcat used JSP. PHP programming is popular and comparatively easier while JSP is more powerful. JSP is object oriented and has access to the Java libraries. Based upon the programming language's ability to develop the system one of the framework can be selected.

GIS Server
In the framework based on WAMP, linking of WAMP with GeoServer is not possible while in the framework based on Apache Tomcat, Apache Tomcat can easily linked to GeoServer. In this GeoServer's Web application archive (.war) file is put into the webapps directory of Tomcat which is a servlet container.

Database Support
Framework based on WAMP used MySQL database while framework based on Apache Tomcat used PostgreSQL/ PostGIS database which is more capable in handling spatial data and have larger feature set. MySQL can perform query on minimum bounding box, it cannot perform it on actual geometry (Ramsey, 2011).

CONCLUSIONS
The performance of both the frameworks has been compared. In framework based on WAMP, PHP codes are used which are common among Web developers of any stream. In framework based on Apache Tomcat, servlet and JSP plays the major role in the development of fully fledged Web GIS. From the comparison it is clear that the framework based on Apache Tomcat is more preferable than the framework based on WAMP.
The development of both Web GIS frameworks have been explained in detail that provide the requisite knowledge that is required by the users in the creation of Web GIS applications. Advantages and disadvantages of both frameworks were given which would educate to compare such frameworks and assist in selecting the most suitable one for a particular application. This paper gives state of the art information on Web GIS frameworks which is required to develop applications in the field of GIS.