Using functions to generate spatial data

You can use functions to generate spatial data from input data.

Spatial data can be generated not only by geocoders, but by other functions as well. For example, suppose that the bank whose branches are defined in the BRANCHES table wants to know how many customers are located within five miles of each branch. Before the bank can obtain this information from the database, it needs to define the zone that lies within a specified radius around each branch. A Db2® Spatial Extender function, ST_Buffer, can create such a definition. Using the coordinates of each branch as input, ST_Buffer can generate the coordinates that demarcate the perimeters of the zones. Figure 1 shows the BRANCHES table with information that is supplied by ST_Buffer.
Figure 1. Table that includes new spatial data derived from existing spatial data. The coordinates in the SALES_AREA column were derived by the ST_Buffer function from the coordinates in the LOCATION column. Like the coordinates in the LOCATION column, those in the SALES_AREA column are simulated; they are not actual.
top The SALES_AREA column in the BRANCHES table.

In addition to ST_Buffer, Db2 Spatial Extender provides several other functions that derive new spatial data from existing spatial data.