Building a Geospatial Information System, Part 2: A real world application using Web 2.0, SOA, and SCA principles

Businesses, schools, and governmental institutions are increasingly using geospatial information systems (GIS) to solve real-world problems. GIS offers many new ways to visualize information, collaborate, and do business. Web 2.0 GIS applications have started targeting end user audiences (as opposed to professional audiences). This article explores how GIS applications built with Web 2.0 interfaces and technologies result in more interactivity, lower cost, higher performance, and satisfied users.

Share:

Angel Tomala-Reyes (aetomala@us.ibm.com), Software Engineer, IBM

Angel Tomala-Reyes photoAngel 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 (mural@us.ibm.com), IT Architect, IBM

Murali Vridhachalam photoMurali 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.



21 April 2009

Introduction

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.

Part 3 will have lessons learned from architecting and building the GIS, and recommendations for extensibility, scalability, and performance.

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.
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
Use Case Model Diagram

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.

SCA has emerged as a standard in SOA. With SCA, developers will need to focus only on developing business logic. SCA provides a single programming model for invoking a component. It allows a single component to have multiple bindings, and bindings that are configurable.

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.


Component view

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
Component View

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
Interaction Diagram

Application architecture

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
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
Map based User Interface

Summary

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.

Resources

Learn

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

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into SOA and web services on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=SOA and web services
ArticleID=383394
ArticleTitle=Building a Geospatial Information System, Part 2: A real world application using Web 2.0, SOA, and SCA principles
publish-date=04212009