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.
Requirements of the system
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.
Use case model
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.
- Will be able to manage user roles.
- 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.
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. Application architecture
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 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.