Skip to main content


developerWorks  >  Information Management  >

Integrating Custom Geocoders with the DB2 Spatial Extender

developerWorks

Level: Introductory

Knut Stolze (stolze@de.ibm.com), DB2 WebSphere Information Integration Development, IBM Germany

01 May 2003
Updated 11 Jul 2005

Get the downloads

Geocoding is the process of converting an address to spatial data (geometry), consisting of one or more sets of coordinates that define the real-world location and shape of the geometry. This paper explains how you can define a scalar user-defined function (UDF) that will perform the geocoding task and convert the result to a representation that is understood by the DB2 Spatial Extender. Sample code is included.

Geocoding is the process of converting an address to spatial data (geometry), consisting of one or more sets of coordinates that define the real-world location and shape of the geometry. The tool that peforms such a task is called a geocoder. A geocoder is a function that takes the address as input parameter and computes the associated coordinates as output parameter.

This paper explains how you can define a scalar user-defined function (UDF) that will perform the geocoding task and convert the result to a representation that is understood by the DB2 Spatial Extender. The actual matching of the given address against the reference data is not the focus of this paper. Instead, the integration aspects for existing geocoders are described. The following topics are described:

  • Section 2 shows how a Web service can easily be exploited from DB2 UDB to act as a geocoder in a spatial database.
  • Section 3 explains the implementation of two functions implemented in SQL that convert a given pair of coordinates to a point and to geocode addresses where the reference data is stored in another table in the same database.
  • Section 4 shows how to implement a wrapper to make the functionality of a Sagent Technology geocoder named GeoStan available.
  • Section 5 describes the various geocoder and geocoding-related functionality in the DB2 Spatial Extender, including registration, setup, and running the geocoder.



Downloads

DescriptionNameSizeDownload method
Article in PDF formatdb2andgeocoders.pdf6.7 MBFTP|HTTP
Source codegeocoder.zip593KBHTTP
Information about download methodsGet Adobe® Reader®


About the author

Author photo

Knut Stolze started his work with DB2 when he joined IBM as a visiting scientist at the Silicon Valley Lab where he worked on the DB2 Image Extender. For the following two years he moved on to the DB2 Spatial Extender team and was responsible for several enhancements to improve the usability, the performance, and the standard-conformance of the Extender. Currently, he works as a teaching assistant at the University of Jena, Germany, and continues his work for IBM in the area of the Information Integrator development. He can be reached through the newsgroups comp.databases.ibm-db2 and ibm.software.db2.udb.spatial or via stolze@de.ibm.com.




Rate this content


Please take a moment to complete this form to help us better serve you.



 


 


Not
useful
Extremely
useful
 


Back to top


Document options

Document options requiring JavaScript are not displayed

Sample code


My developerWorks needs you!

Connect to your technical community


Rate this content

Help us improve this content