# Spatial reference systems

A spatial reference system is a set of parameters that is used to represent a geometry.

- The name of the coordinate system from which the coordinates are derived.
- The numeric identifier that uniquely identifies the spatial reference system.
- Coordinates that define the maximum possible extent of space that is referenced by a specified range of coordinates.
- Numbers that, when applied in certain mathematical operations, convert coordinates received as input into values that can be processed with maximum efficiency.

The following sections discuss the parameter values that define an identifier, a maximum extent of space, and conversion factors.

## Spatial reference system identifier

The spatial reference system identifier (SRID) is used as an input parameter for various spatial functions.

## Defining the space that encompasses coordinates stored in a spatial column

The coordinates in a spatial column typically define locations that span across part of the Earth. The space over which the span extends-from east to west and from north to south-is called a spatial extent. For example, consider a body of flood plains whose coordinates are stored in a spatial column. Suppose that the westernmost and easternmost of these coordinates are latitude values of -24.556 and -19.338, respectively, and that the northernmost and southernmost of the coordinates are longitude values of 18.819 and 15.809 degrees, respectively. The spatial extent of the flood plains is a space that extends on a west-east plane between the two latitudes and on a north-south plane between the two longitudes. You can include these values in a spatial reference system by assigning them to certain parameters. If the spatial column includes Z coordinates and measures, you would need to include the highest and lowest Z coordinates and measures in the spatial reference system as well.

The term spatial extent can refer not only to an actual span of locations, as in the previous paragraph; but also to a potential one. Suppose that the flood plains in the preceding example were expected to broaden over the next five years. You could estimate what the westernmost, easternmost, northernmost, and southernmost coordinates of the plains would be at the end of the fifth year. You could then assign these estimates, rather than the current coordinates, to the parameters for a spatial extent. That way, you could retain the spatial reference system as the plains expand and their wider latitudes and longitudes are added to the spatial column. Otherwise, if the spatial reference system is limited to the original latitudes and longitudes, it would need to be altered or replaced as the flood plains grew.

## Converting to values that improve performance

Typically, most coordinates in a coordinate system are decimal values; some are integers. In addition, coordinates to the east of the origin are positive; those to the west are negative. Before being stored by the spatial feature, the negative coordinates are converted to positive values, and the decimal coordinates are converted into integers. As a result, all coordinates are stored by the spatial feature as positive integers. The purpose is to enhance performance when the coordinates are processed.

Certain parameters in a spatial reference system are used to make the conversions described in the preceding paragraph. One parameter, called an offset, is subtracted from each negative coordinate, which leaves a positive value as a remainder. Each decimal coordinate is multiplied by another parameter, called a scale factor, which results in an integer whose precision is the same as that of the decimal coordinate. (The offset is subtracted from positive coordinates as well as negative; and the nondecimal coordinates, as well as the decimal coordinates, are multiplied by the scale factor. This way, all positive and non-decimal coordinates remain commensurate with the negative and decimal ones.)

These conversions take place internally, and remain in effect only until coordinates are retrieved. Input and query results always contain coordinates in their original, unconverted form.