Home Articles Going Open in WebGIS

Going Open in WebGIS


Jason Lee
Malaysia University of Science and Technology

Dr. Woon Wei Lee
Malaysia University of Science and Technology

Abstract
This paper investigates the possibility of adopting open standards and technologies for the development of geographic information systems (GIS) particularly for the web. The GIS market has traditionally been monopolized by several key players that make up a large segment of commercially available systems and raises the issue of interoperability. GIS software is often high in cost and restricts access to the select few who can afford it. Adopting an open standard is one of the solutions but are the current open source libraries and software sufficiently mature to be used for web mapping applications? An extensive review was conducted and the findings are presented in this paper on existing open source libraries and software to determine their impact in the development of GIS. This also includes several standards that are adopted by the Open Geospatial Consortium (OGC) which will shape the future growth of remote sensing. In contrast with popular belief in the difficulty of developing using open source software, we developed and documented a simple proof of concept WebGIS system. This paper is based on actual reviews on selected open source libraries, software and published materials, including white papers, standards documentation and journals.

1.0 Introduction
The use of open source based software has always attracted keen interest in the tech community. Not too long ago, the phrase “open source” was usually associated with a high learning curve and there was also difficulty and complications when integrating with existing systems. The same cannot be said now with many successful open source software products such as Linux, Open Office and Mozilla. The advancement of the Internet has lead to people who share common interests to group together and form communities dedicated to collaborative software development and pooling of knowledge.

1.1 Open Information Sharing
With the dominance of commercial based software, there is minimal sharing of spatial information as the information is locked in with the system. Moving from one system to another is often difficult with each system having a proprietary format that cannot be read by the other. The difficulties arise when information from two different sources needs to be integrated and this cannot be done due to incompatibility between the respective data formats.

1.2 Web-GIS System
A WebGIS system can be modelled using the client-server architecture[1]. A thin client approach is where most of the processing work is done on demand in the server and the client does not perform any task other than to display the data on screen. The thin client system comprises two parts, the client and the server and this model will be used for our simple demonstration later in this paper.

The advantage of this is that users will not be required to install any additional software apart from a standard web browser. Since processing will be done on the server side, clients will not need a powerful machine to access the services offered, though this would also mean that the server would be subject to additional and often heavy loads. However, in order to reduce server loading, the HTTP server, database and WebGIS software do not necessarily have to reside on the same server and can be distributed across the Internet.

2.0 Going the Open Way
Standardization means that everyone agrees to a common system. The Open Geospatial Consortium (OGC) is the organization that is responsible for setting these standards through an open process. In the old GIS paradigm, clients usually need a separate interface to access different vendors’ systems. The lack of an open standard discouraged vendors from having a common system. The open standards that are introduced in this chapter are steps taken by industry to help eliminate the problem of users being trapped in technology stovepipes [2]. We will review some of the successful standards and tools that are paving the way in making GIS more accessible to the open source community

2.1 Open Web Service (OWS)
Geoprocessing is a task that requires specialized software and sometimes hardware. A system that is capable of performing spatial tasks is often difficult to maintain and expensive. In [3] it was argued that the solution would be to use a distributed development platform to separate the data and actual processing into two separate servers using a web service. A web service is a program that makes itself accessible over the Internet using XML as a messaging system. The OGC envisioned OWS to be a system where users can access geospatial data through a single interface regardless of the platform being used. The OWS suite includes three principal types of georeferenced information services which are Web Map Server (WMS), Web Coverage Server (WCS) and Web Feature Server (WFS)[4]. This discussion is focused on building a system that is compliant to OGC’s WMS and WFS specifications.

2.1.1 Web Mapping Service (WMS)
A WMS is capable of generating a map as an image, usually in JPEG, PNG or GIF or even as vector-based graphical elements in Scalable Vector Graphics (SVG) formats of georeferenced data and this is in contrast with a Web Feature Service (WFS) which returns raw geographic data. Think of WMS server as a storage server of specific types of maps. These maps will be generated on the fly depending on the user’s request based on the Styled Layered Description (SLD) file. A SLD is used to define rules using a styling language that both the client and server can understand.

2.1.2 Web Feature Service (WFS)
OGC’s Web Feature Service (WFS) specifies the interfaces for data manipulation operations of geographic transactions. The WFS operations include insert, update, delete, query and discovery operations on geographic features. A WFS is capable of performing what a WMS can do and more. While a WMS returns data as an image, WFS returns data in GML which is the standard language used by spatial applications. It allows programmers to develop applications that can perform spatial queries over the Internet or through SOAP protocol.

2.2 Open Source Projects
Open source GIS systems have received more attention lately as the learning curves for these software toolkits are being lowered. According to [5], there are two development languages that are identified as being widely used in open source GIS:-

  • C/C++ language – considered as the early developers of Open Source GIS toolkits and includes scripting languages such as Python, Perl and PHP which can easily bind to the C/C++ libraries. Many of the Java libraries are actually built based on the C libraries.
  • Java language – a newer modular language for GIS toolkits. They have almost equally as many libraries compared with their C counterparts and is gaining popularity among developers.

According to [6], open source GIS tools can be broken down into desktop and server applications. For this paper, we would review both desktop and server tools in both C and Java. However, the focus would be primarily on the server tools as highlighted in Figure 2 1.


Figure 2 1: Open Source GIS Toolkits

2.3 C/C++ Based GIS Toolkits and Projects
The strength of C/C++ based toolkits lies in the maturity of the available libraries as these have received a lot more developer time. There are many shared C libraries available on the Internet that can be used for the development of a GIS such as GDAL and Proj4. The purpose of these shared libraries is to promote code reusability. The following are commonly used C based libraries on the surveyed Open Source projects:-

2.3.1 GDAL / OGR
The Geospatial Data Abstraction Library (GDAL) is a translator for raster geospatial objects which provides read and write functionality for various data formats. The OGR toolkit provides read and write functions in vector formats such as ESRI Shapefile, PostGIS database and Mapinfo TAB format. GDAL is by far the most popular library being used by successful C based projects and has been ported partly into Java and used by various open source toolkits that we have reviewed in here.

2.3.2 MapServer
MapServer is the most successful open source GIS project surveyed and is developed by the University of Minnesota. MapServer is a web application server that can be deployed over the Internet using open source libraries such as Shapelib (a free C library used to read and write ESRI Shapfile format), FreeType (font engine), GDAL and OGR. It is built in with MapScript to provide users with an interface to access MapServer’s C API using PHP, Perl, Python or Java.

The Mapserver CGI is called mapserv which is an interface thate handles input and directs image creation or query request. MapServer complies with OGC’s WMS and WFS specification. Access to Mapserver’s web services are primarily through a CGI interface but HTTP POST commands are also supported. Mapserver has by far the largest user base for open source GIS application development.

2.4 Java Based Toolkits and Projects
Similar to the C based projects, Java GIS toolkits promote the development of GIS through object oriented programming. Developers in the Java GIS camp initially wanted to unify the 3 main Java toolkits namely OpenMap, GeoTools and DeeGree but failed to do so [5] due to licensing agreements. OpenMap is still independently developed but GeoTools and DeeGree have converged into a single project and is only known as Geotools. Most of the Java projects surveyed have common library files based on the two libraries which are mentioned below.

2.4.1 JTS Topology Suite
The JTS Topology is a Java API that provides a set of core libraries that provide spatial applications a set of operations that using explicit models and robust generic algorithms [7]. JTS provides a Java implementation of the OpenGIS Simple Feature Specifications for SQL (SFS). JTS has built in a complete, consistent implementation of basic 2D spatial algorithms such as binary predicates and spatial analysis methods.

2.4.2 GeoTools
Geotools is an open source Java GIS toolkit for development of OGC compliant programs. It has a modular architecture which allows additional functionality to be incorporated. The developers of Geotools do not intend to make it a comprehensive GIS product or application but intend to interact and support other initiatives and projects which could leverage the Getools toolkit to create such a resource [8]. It is not a tool for geomatics but a set of Java libraries compliant with GeoAPI interface specifications. This interface specification aims to reduce the duplication by providing a neutral interface that GIS projects can use to access and reducing any interoperability issues.

The Geotools has two renderer implementations. The LiteRenderer is a stateless renderer where the results of drawing an object does not depend on the state of the system or on previously executed commands. LiteRenderer is powerful on the server side environment and its code base is simple and also faster than J2D for map rendering. J2D is a stateful renderer which supports on-the-fly coordinate re-projections and fast update through data decimation and memory caching.

2.4.3 Geoserver
Geoserver is a GIS web server released under the GPL license which is built fully using the Java 2 Platform Enterprise Edition (J2EE). Geoserver is a fully integrated Web Feature Server (WFS) and Web Map Server (WMS) that conforms to the OpenGIS Consortium’s specifications. It is a middleware that allows users to modify and retrieve data over the Internet using a browser. Geoserver aims to make geographic data easily accessible through Web Services. The developers envisioned a spatial web where data can be freely accessed and the project is to be the central repository from which such information can be easily obtained. Geoserver is built using Geotools as the library and thus conforms to the OGC specifications. It supports a high number data types such as shapefiles and datastores such as PostGIS or MySQL which are handled directly by Geotools and is transparent to Geoserver. Geoserver has its share of problems but active development by the open source community makes it a good alternative to commercial GIS software packages

2.5 Mapbuilder
Mapbuilder is WebGIS software that consists of a collection of libraries and widgets that are used to dynamically generate web pages from XML documents [9]. Mapbuilder can visually display map images on screen which are generated from a WMS or WFS service such as Geoserver or MapServer. The libraries in Mapbuilder are JavaScript based, implementing the model-view-control (MVC) design pattern. The techniques used by this package are called AJAX which is short for Asynchronous JavaScript + XML. Ajax is not a new technology but a combination of several technologies such as XHTML, CSS and Document Object Model (DOM) that incorporates JavaScript to bind these technologies together [10].

2.5.1 PostgreSQL with PostGIS support
PostgreSQL is a popular open source relational database management system (RDBMS). It has been in development for the past 15 years and can run on multiple platforms including Linux, UNIX and Windows. It is an enterprise class database which means that it contains features and functionalities on par with commercial RDBMS but what sets it apart from many commercial databases is the availability of a wide range of extensions.

PostGIS is a spatial extension for PostgreSQL which allows it to be used as a spatial database for GIS in the proposed implementation. PostGIS conforms to OpenGIS Simple Features Specification for SQL and is released under the GNU General Public Licence and developed by Refraction Research, a research group on open source GIS databases. PostGIS has many powerful functions built-in that are useable “out of the box”. Some of the functionalities are from the GEOS library thus providing it with the ability to provide geometry tests such as intersects, difference, buffer and many others. We will be using PostgreSQL as the back-end database to feed data to the WFS and WMS servers as it is widely supported by many open source GIS toolkits that we have reviewed is required to used by our routing algorithm called pgdijkstra.

3.0 WebGIS System
From our review of some of the popular toolkits that are available for GIS development, it is clear that there is a wide variety of tools for the open source developer to choose from. Nevertheless, there still remain doubts in the general community on the practicality of creating an application with just open source software. To address these concerns, we chose to demonstrate a simple proof of concept system that can be used to deliver basic GIS services through the Internet using a thin client approach as mentioned earlier in this paper.

3.1 System Setup
The system is setup on a P4 3.0 GHz machine as illustrated in Figure 3 1. Geoserver, Mapbuilder and PostgreSQL are running on different ports in the same machine running on Fedora Core 3. In reality, these software can be running on separate servers to increase the performance. The OWS (Geoserver) will act as a central repository providing web services for consumption. The OWS does not also necessarily have to come from external sources such as Landsat or Radarsat.


Figure 3 1: Simple WebGIS Architecture

3.2 System Demo
We chose to use Geoserver to offer web services which is to be consumed by Mapbuilder, the open source WebGIS front end. A map of Klang Valley was imported into PostgreSQL which is read by Geoserver. This prototype system will be used as a call taxi vehicle management system. When the user searches for a particular road, the closest taxis will be displayed on screen. Users can zoom, pan and query the roads by clicking on the map, which will be updated interactively using AJAX. Figure 3 2 shows a screenshot of the prototype.

Figure 3 2:Mapbuilder Screen Shot

When a service call is received, the operator would enter the road name and the system would locate the closest taxi using pgdijkstra, an extension for PostGIS which implements Dijkstra’s Shortest Path Algorithm. Clicking on the taxi name would refocus the map on the taxi.

3.3 Summary
The WebGIS system that is developed is not a complex system. Most of the components that are featured in the system are built-in or required minor tweaking to suit our needs. The purpose of developing this system was to prove that a simple WebGIS can be easily created using publicly available open source software. We managed to prove that the open source software and toolkits currently available are sufficient for developing a WebGIS system although some effort is required to integrate components from different developers.

4.0 Conclusion
We have reviewed some of the more successful open source libraries and toolkits that have emerged from the open source GIS community. Many of the libraries are already quite mature as a result of rapid development over the past few years. We do not believe that open source software will replace commercially available systems entirely, especially in the creation and production of maps but will serve to complement current options for GIS development especially in the area of WebGIS. GIS is still considered a specialized field but the availability of open source software will help to break down the barriers to entry and make GIS more accessible to the public.

5.0 References

  1. T. Horanont, N. K. Tripathi, and V. Raghavan, “A Comparative Assessment of Internet GIS Server Systems,” vol. 2005, 2002.
  2. L. McKee, “The Importance of Going “Open”,” Open Geospatial Consortium Inc., 2005, pp. 8.
  3. L. McKee, “The Spatial Web,” Open Geospatial Consortium Inc., 2003, pp. 8.
  4. “Web Map Service Implementation Specification,” Open Geospatial Consortium, 2005, pp. 30.
  5. P. Ramsey, “The State of Open Source GIS,” Refraction Research, 2005, pp. 36.
  6. A. Racicot, “Open Source GIS – Technology Overview,” Ecotrust, 2006, pp. 36.
  7. J. Aquino and M. Davis, “JTS Topology Suite Technical Specification,” Vivid Solutions, 2003, pp. 36.
  8. “Geotools User Guide,” vol. 2005, n.d.
  9. M. Adair, “Introduction to Mapbuilder,” vol. 2005, 2004.
  10. J. J. Garrett, “Ajax: A New Approach to Web Applications,” vol. 2005, 2005.