Skip to main content

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

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

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.

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

All information submitted is secure.

  • Close [x]

Analyze DB2 spatial data with a free geobrowser

Use the IBM Data Management geobrowser for DB2 and Informix to visualize relational table data

David Adler (dadler@us.ibm.com), Senior Software Engineer, IBM
David Adler
David Adler has been responsible for the development of spatial database technology in IBM for over 20 years, the past 10 years in DB2 Spatial Extender Development.

Summary:  A geobrowser for IBM® DB2® and Informix® is now available as a free download. You can easily list tables containing spatial data and select tables to display as a map using a combination of points, lines, and polygons. The color, symbols, line style, and shading are user-selectable. Map navigation tools allow you to zoom in and out, pan, and select and display the alphanumeric values associated with each graphic object. The geobrowser can render the results of spatial analysis using DB2 or Informix. For example, the results of a spatial query that identifies customers within a flood zone can be visualized. The geobrowser is based on components from IBM's ILOG® JViews Maps. Use these components to construct custom spatial visualization applications. This tutorial shows how to use the free geobrowser to visualize data from DB2 tables.

Date:  24 Mar 2011
Level:  Intermediate PDF:  A4 and Letter (638 KB | 21 pages)Get Adobe® Reader®

Activity:  17047 views
Comments:  

Before you start

For more than 10 years, the DB2 Spatial Extender and Informix Spatial DataBlade have provided the capability of managing and analyzing spatial data in DB2 and Informix relational tables. Table columns can be defined with spatial types for points, lines, and polygons, which can represent objects like:

  • Point locations — Customers, retail stores, electrical transformers, cell towers
  • Lines — Highways, coastline, delivery routes, electrical transmission lines
  • Polygons — Sales/service territories, flood/fire risk, states/provinces/counties

SQL queries can incorporate spatial functions to analyze spatial relationships, such as finding customers within a flood zone. For example:

SELECT cust_name, cust_addr
FROM customers, flood zones
WHERE ST_Within(cust_loc, flood_loc) = 1

The result of this query would produce a set of customer names and addresses whose houses could be at risk of flooding. This might be useful in calculating insurance rates or sending out an offer to purchase flood insurance.

In many cases, additional insight can be derived by visualizing the result in a mapping tool. As they say, "A picture is worth a thousand words." The rest of this tutorial will show you how to use the free geobrowser to visualize this data from DB2 tables.


Figure 1. Kentucky customers highlighting in red those in a flood zone
A map of Kentucky customers highlighting in red those in a flood zone

About this tutorial

This tutorial takes you through setting up DB2 with a sample database, setting up the geobrowser, and running the geobrowser to visualize spatial tables and the results of spatial analysis. Suggestions are provided to efficiently work with spatial data and explore additional spatial visualization techniques.

Although this tutorial is based on DB2 for Linux®, UNIX®, and Windows®, the same operations are possible, with minor changes, using DB2 for z/OS® or the Informix database.


Prerequisites

This tutorial is written for spatial application developers and database application developers. You should have some familiarity with spatial data and working with SQL queries.


System requirements

To run the examples, you need a Windows or Linux environment with about 500 MB available to install DB2 and the geobrowser. If DB2 is already installed, you only need about 20 MB.

1 of 9 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management, WebSphere
ArticleID=642280
TutorialTitle=Analyze DB2 spatial data with a free geobrowser
publish-date=03242011
author1-email=dadler@us.ibm.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.