Using business data as source data

Db2® Spatial Extender can derive spatial data from business data, such as addresses. This process is called geocoding.

To see the sequence involved, consider Figure 2 as a before picture and Figure 1 as an after picture. Figure 2 shows that the BRANCHES table and the CUSTOMERS table both have a column designated for spatial data. Suppose that Db2 Spatial Extender geocodes the addresses in these tables to obtain coordinates that correspond to the addresses, and places the coordinates into the columns. Figure 1 illustrates this result.

Figure 1. Tables that include spatial data derived from source data. The LOCATION column in the CUSTOMERS table contains coordinates that were derived from the address in the ADDRESS, CITY, POSTAL CODE, STATE_PROV, and COUNTRY columns. Similarly, the LOCATION column in the BRANCHES table contains coordinates that were derived from the address in this table's ADDRESS, CITY, POSTAL CODE, STATE_PROV, and COUNTRY columns.
top Sample LOCATION columns in BRANCHES and CUSTOMERS tables.

Db2 Spatial Extender uses a function, called a geocoder, to translate business data into coordinates to allow spatial functions to operate on the data.