This series discusses how businesses, schools, and government institutions are increasingly using geospatial information systems (GIS) to solve real-world problems. GIS offers exciting new ways to visualize information, collaborate, and do business. In Part 1 you learned the basics of GIS. It covered open source and proprietary software considerations, a basic GIS architecture, and how GIS is used to solve problems in various industries.
This article provides details on how to build a Web 2.0 GIS using Service Oriented Architecture (SOA) and Services Component Architecture (SCA). Learn how to build a GIS with several open source products and freely available services on the Web.
The architecture of the example application should meet the following high level requirements.
- The GIS system should allow:
- Casual end users to view a map with water basin delineations, to view data about a basin of interest, and to query the results of pre-computed simulations (water balance, water quality, and crop production) for the selected basin.
- Expert users to authenticate, collaborate with other users, generate user-defined reports, and share the reports with other expert users and the public.
- Using different predefined inputs, a hydrology model is executed to compute water balance, water quality, and crop production in the river basins. The input and output spatial data for each basin is to be stored in a spatial data store.
- Other Web sites and RSS/Atom feed readers can consume data from this system.
Given the high level requirements, the actors and use cases in Figure 1 were identified. The use case model has four actors:
- Casual user
- Will only be able to display maps and run queries.
- Special users
- Register with the system, and need to authenticate, to collaborate with other special users and generate reports.
- Administrators
- Will be able to manage user roles.
- System
- Will provide mapping services, run queries against spatial data, and expose APIs that other Web sites can use to display data from this system and RSS/Atom feed readers to read feeds from this system.
Figure 1. Use case model

Technology and software products used
To build a GIS system, there are several open source and proprietary software choices available from the enterprise software portfolio offered by IBM and ESRI. This section briefly describes the robust open source and proprietary software used to build the example system in this article.
The solution is deployed in WebSphere Application Server Community Edition V 2.1, ArcGIS Server 9.3 Enterprise Edition with Spatial Extensions, and DB2 9.5 as the data store.
- WebSphere Application Server Community Edition is an open source lightweight Java EE 5 application server based on open source Apache Geronimo. It harnesses the latest innovations from the open source community, including Apache Tomcat.
- ArcGIS Server 9.3 Enterprise Edition is a complete server based geographic
information system. It provides a rich standards-based platform,
extensive GIS capabilities, data management tools, out-of-the-box end user
services, visualization (mapping), and spatial analysis. It supports
interoperability standards in the GIS domain as published by the Open
Geospatial Consortium (OGC). ArcGIS applications are interoperable with
clients that read and write Web Map Services (WMS). SOAP and XML can be
used for messaging and data transfer over the Web (HTTP). ArcGIS server
supports integration with other enterprise systems using SOA implementation.
Spatial extensions enable spatial modeling and analysis.
The University of Minnesota MapServer (commonly called UMN MapServer) is a robust open source alternative to the proprietary ArcGIS Server 9.3. MapServer can display dynamic spatial maps over the Internet. It provides support for display and querying of hundreds of raster, vector, and database formats. It supports popular scripting languages and development environments, such as PHP, Python, Perl, Ruby, Java and .Net .
- DB2 9.5 is a market-leading relational database that supports XML as a native data type and is able to store spatial data using spatial extenders.
Open source PostgreSQL is a robust relational database, and is supported by ArcGIS Server 9.3. PostgreSQL database can store spatial data using spatial extensions (PostGIS).
Java Persistence API (JPA) is used to access the database. It provides a standards based lightweight persistence framework that lets you manage relational data from Java EE applications with or without an EJB container. JPA draws some of the best ideas from Hibernate, TopLink, JDO and EJB frameworks. JPA requires that you use Java persistence Query Language (JPQL), allowing you to write portable queries that work regardless of the underlying data store. This helps address database migration issues. JPA is a specification, so vendor-specific implementation must be used. For the example, the open source implementation Apache OpenJPA was a robust choice.
For Web 2.0 functions, the example uses ArcGIS API for JavaScript to build the Web mapping applications. It provides an easy-to-use framework for building lightweight Web mapping applications. It is built on the Dojo JavaScript Toolkit, providing access to dijits (Dojo widgets) and other JavaScript tools.
Apache Tuscany open source SCA implementation was chosen for the example. It simplifies the task of developing SOA solutions by providing a comprehensive infrastructure for SOA development and management that's based on the SCA standard. Service developers are able to create reusable services that only contain business logic. Protocols are pushed out of business logic and are handled through a wide range of pluggable bindings. A single implementation of business logic can be exposed by different bindings. For example, JavaScript Object Notation (JSON)-RPC, Atom, RSS, EJB, and Web services are some of the bindings that can be specified. Applications can easily adapt to infrastructure changes without recoding; protocols are handled with pluggable bindings and quality of services (transaction, security, and so on) are handled declaratively.
To support authentication services and user roles, the example uses open source OpenLDAP as the Lightweight Directory Access Protocol. It is well established, very reliable, and performance is excellent. It can scale to hundreds of millions of objects in data volumes in excess of terabyte, with performance in excess of 22,000 queries per second at sub-millisecond latencies. OpenLDAP offers a rich feature set, and a BerkleyDB back end. Security features include support for SASL, TLS, SSL, IPC, and password policies. It also supports IPv6 and LDIFv1.
Google Charts API, which is available for free, is used to display charts. It returns a PNG-format image in response to a URL. For each image type, size, color and labels can be specified. Applications can make hundreds of thousands of API calls per day.
The component diagram below shows the static dependency relationships between the components. It describes the structure of the system in terms of its software components, including their responsibilities and how they collaborate to deliver the required functions. Components in the diagram are decomposed into further component models before they complete the specification required for detailed design.
Figure 2. Component diagram

The interaction diagram, in Figure 3, shows the interactions between individual component instances. It shows how they collaborate to allow JSON objects to be passed from the front end to the back end persistence layer through services facilitated by Dojo and Apache Tuscany.
Figure 3. Interaction

Figure 4 shows how Web 2.0 user interfaces are implemented using ESRI JavaScript API and Dojo. Base maps are displayed by accessing ESRI services using a JavaScript API. All of the business logic on the server side is implemented in Java using Apache Tuscany (SCA). This allowed the business logic to be exposed with multiple bindings, which enabled different types of remote applications to consume data from our system. All geoprocessing (queries against spatial data) and mapping services (basin delineations) are implemented in python and exposed as RESTful services. Remote applications can consume these services without having to go through our Web application front end.
Figure 4. Application architecture

To display summary data for each basin, Google charting services are used after REST services are invoked to retrieve data from the GIS server. OpenJPA is used to manage all database interactions and transactions using JPQL, which is vendor neutral. Various remote applications implemented using JavaScript, Dojo, Feed readers, and so on consume data from this system using the different bindings. Spatial data accessed by the REST services are stored in a file based data store.
Figure 5 shows a map based user interface from the example application, including a Dojo widget displaying summary data for a water basin.
Figure 5. Map based user interface

You can build feature-rich Web 2.0 GISs using proprietary or open source technologies and freely available services on the Web. Apache Tuscany, an open source implementation of SCA, can help rapid development and deployment of services. The services can be exposed with several bindings that can be consumed by a variety of clients, including other Web applications and RSS/Atom feed readers.
Learn
- Learn more about
Apache Tuscany, and how it
simplifies the task of developing SOA solutions by providing a comprehensive infrastructure for SOA development and management that is based on SCA standards.
- Learn about and download
Dojo.
- Get an overview of the
ESRI Dojo Toolkit.
- ESRI, the GIS software market leader,
provides white papers on numerous topics.
-
The IBM Redpaper Infrastructure
Recommendations for an ESRI and IBM Geographic Information System introduces GIS and ESRI and discusses the software and hardware components that are available to create a GIS system that meets the needs of a wide range of users.
- "The State of Open Source GIS" (Refractions Research Inc., Sep 2007) covers an array of topics.
-
IBM Maximo Asset Management Essentials
provides industrial strength GIS data asset management capabilities, enabling smaller organizations to organize, track, and manage asset and work management processes with industry-leading technology.
- Learn more about the various IBM products
that can be used to build a GIS, including
IBM WebSphere,
IBM DB2,
and
IBM BladeCenter® servers.
Get products and technologies
-
Download IBM product evaluation versions and get your hands on application development tools and middleware products from DB2, Lotus, Rational, Tivoli, and WebSphere.
Discuss
-
Check out developerWorks
blogs and get involved in the developerWorks community.

Angel E. Tomala-Reyes is a software engineer for the IBM Corporate Information Office. Before joining IBM's CIO development team, he worked for IBM Global Services building distributed ticketing systems and other complex J2EE applications and integration solutions. He is focused on designing and implementing front-end applications using some of the latest technologies in the Web space. His mission is to create highly effective and highly adaptable user interfaces and to advance IBM's enterprise products.

Murali Vridhachalam, an Open Group certified IT architect, has been involved with XBRL since early 2005. He was the lead architect for IBM's first ever submission of financial reports using XBRL, as part of the SEC's XBRL voluntary filing program. His current interests include SOA and Software as a Service offerings built using the IBM enterprise software portfolio.
Comments (Undergoing maintenance)





