User's Guide and Reference

Using geocoders

This section describes the process of geocoding and explains how to run a geocoder in batch mode from the Control Center.

About geocoding

This section distinguishes basic differences between geocoders and their sources. It also describes the two modes in which a geocoder can operate, and introduces factors to consider when you plan to use a geocoder.

With DB2 Spatial Extender, you can:

The default geocoder geocodes United States addresses, and can translate them into either ST_Point data or ST_Geometry data. If you need to store data of other spatial data types, you could plug in a geocoder to generate such data. If you need spatial data that represents sites outside the United States, or sites that have no addresses--for example, farmlands that vary in soil content--you could plug in a geocoder to meet that need as well.

Before a plug-in geocoder can be used, it must be registered. Users and vendors can register it with the db2gse.gse_register_gc stored procedure. It cannot be registered from the Control Center. For information about db2gse.gse_register_gc, see db2gse.gse_register_gc. For general information about using the DB2 Spatial Extender stored procedures, see Stored procedures.

A geocoder operates in two modes:

When planning to use a geocoder, you might consider the following factors:

  1. When you use the Control Center, you typically use the Create Spatial Layers window before you use the Run Geocoder window. This means that you can have DB2 Spatial Extender set up triggers for incremental geocoding before you initiate batch geocoding. Therefore, it is possible for incremental geocoding to precede batch geocoding. Processing all source data in batch mode, the geocoder will geocode the same data that it operated on in incremental mode. This redundancy will not cause duplications (when spatial data is produced twice, the second yield of data will override the first). However, it can degrade performance. One way to avoid it is to defer setting up the triggers until after batch geocoding is done.
  2. If the triggers are in place when you are ready to geocode in batch mode, it is advisable to deactivate them until the batch geocoding is over. You can deactivate them either from the Run Geocoder window or in an application program, by coding the program to call the db2gse.gse_disable_autogc stored procedure. If you use the Run Geocoder window, DB2 Spatial Extender reactivates them automatically when the geocoding is over. If you use the db2gse.gse_disable_autogc stored procedure, you can reactivate them by calling the db2gse.gse_enable_autogc stored procedure.
  3. If you want to run a geocoder in batch mode to populate a spatial column that has an index, disable or drop the index first. Otherwise, if the index remains operable while the geocoder runs, performance will be degraded severely. If you are using the Control Center, you can disable the index from the Run Geocoder window. DB2 Spatial Extender re-enables the index automatically when the geocoding is over. If you are using an application program, you can drop the index with the SQL DROP statement. If you do this, be sure to keep a note of the index's parameters, so that you can recreate it after the batch geocoding is over.
  4. When the geocoder reads a record of source data, it tries to match that record with a counterpart in the reference data. The match must be accurate to a certain degree (called a precision) in order for the geocoder to process the record. For example, a precision of 85 means that the match between a source record and its counterpart in the reference data must be at least 85 percent accurate in order for the source record to be processed.

    You specify what the precision should be. Be aware that you might need to adjust it. For example, suppose that the precision is 100. If many source records contain addresses that are more recent than the reference data, matches of 100 percent accuracy between these records and the reference data will be impossible. As a result, the geocoder will reject these records. On the whole, if a geocoder produces spatial data that seems insufficient or largely inaccurate, you might be able to resolve this problem by changing the precision and running the geocoder again.


[ Top of Page | Previous Page | Next Page ]