This section provides an overview of the data that you generate, store, and operate upon to obtain spatial information. The topics covered are:
In Spatial Extender, a geographic feature can be represented by a row in a table or view, or by a portion of such a row. For example, consider the following two geographic features: office buildings and residences. In Figure 31, each row of the BRANCHES table represents a branch office of a bank. As a variation, each row of the CUSTOMERS table, taken as a whole, represents a customer of the bank; but part of each row--specifically, the cells that contain a customer's address--can be viewed as representing the customer's residence.
Figure 31. Table row that represents a geographic feature; table row whose address data represents a geographic feature. The row of data in the BRANCHES table represents a branch office of a bank. The cells for address data in the CUSTOMERS table represent the residence of a customer.
![]() |
These tables contain data that identifies and describes the bank's branches and customers. Such data is called attribute data.
A subset of the attribute data (the values that represent branch and customer addresses) can be translated into values that yield spatial information. For example, as shown in the figure, one branch office address is 92467 Airzone Blvd., San Jose CA 95141. A customer address is 9 Concourt Circle, San Jose CA 95141. Spatial Extender can translate these addresses into values that indicate where the branch and the customer's home are situated with respect to their respective surroundings. Figure 32 shows the BRANCHES and CUSTOMERS tables with new columns that contain such values.
Figure 32. Tables with spatial columns added. In each table, the LOCATION column will contain coordinates that correspond to the addresses.
![]() |
When addresses and similar identifiers are used as the starting point for spatial information, they are called source data. Because the values derived from them yield spatial information, these derived values are called spatial data. The next section describes spatial data and introduces its associated data types.
Much spatial data is made up of coordinates. A coordinate is a number that denotes a position that is relative to a point of reference. For example, latitudes are coordinates that denote positions relative to the equator. Longitudes are coordinates that denote positions relative to the Greenwich meridian. Thus, the position of Yellowstone National Park is defined by its latitude (44.45 degrees north of the equator) and its longitude (110.40 degrees west of the Greenwich meridian).
Latitudes, longitudes, their points of reference, and other associated parameters are referred to collectively as a coordinate system. Coordinate systems based on values other than latitude and longitude also exist. These coordinate systems have their own measures of position, points of reference, and additional distinguishing parameters.
The simplest spatial data item consists of two coordinates that define the position of a single geographic feature. The term data item refers to the value or values that occupy a cell in a relational table. A more extensive spatial data item consists of several coordinates that define a linear path, such as a road or a river. A third kind consists of coordinates that define the perimeter of an area, such as the rim of a land parcel or flood plain.
Each spatial data item is an instance of a spatial data type. The data type for two coordinates that mark a location is ST_Point; the data type for coordinates that define linear paths is ST_LineString; and the data type for coordinates that define perimeters is ST_Polygon. These types, together with the other data types for spatial data, are structured types that belong to a single hierarchy.
You can obtain spatial data by:
Deriving spatial data from attribute data (such as addresses) is called geocoding. Figure 32 shows two columns, one in the BRANCHES table and one in the CUSTOMERS table, designated for spatial data. Imagine that Spatial Extender geocodes the addresses in these tables and places the resulting output (coordinates that correspond to the addresses) into the columns. Figure 33 illustrates this result.
Figure 33. Tables that include spatial data derived from source data. The LOCATION column in the CUSTOMERS table contains coordinates that a geocoder derived from the address in the ADDRESS, CITY, STATE, and ZIP columns. Similarly, the LOCATION column in the BRANCHES table contains coordinates that the geocoder derived from the address in this table's ADDRESS, CITY, STATE, and ZIP columns.
![]() |
Spatial Extender uses a function, called a geocoder, to geocode attribute data and place the resulting spatial data into columns.
Spatial data can be generated not only from attribute data, but also from other spatial data. 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 must supply the database with the definition of a zone that lies within a five-mile radius around each branch. A Spatial Extender function, ST_Buffer, can create such a definition. Using the coordinates of each branch as input, this function can generate the coordinates that demarcate the perimeters of the desired zones. Figure 34 shows the BRANCHES table with information supplied by ST_Buffer.
Figure 34. 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.
![]() |
In addition to ST_Buffer, Spatial Extender provides several other functions that derive new spatial data from existing spatial data.
A third way to obtain spatial data is to import it from files that are in one of the formats that Spatial Extender supports. These files contain data that is usually applied to maps: census tracks, flood plains, earthquake faults, and so on. By using such data in combination with spatial data that you produce, you can augment the geographic information available to you. For example, if a public works department needs to determine the hazards to which a residential community is vulnerable, it could use ST_Buffer to define a zone around the community, and then import data on flood plains and earthquake faults to see which of these problem areas overlap the zone.