# Function that returns distance information between geometries

ST_Distance takes two geometries and, optionally, a unit as input parameters, and returns the shortest distance between any point in the first geometry to any point in the second geometry, measured in the specified units.

If the second geometry is not represented in the same spatial reference system as the first geometry, it will be converted to the other spatial reference system.

If either of the two specified geometries is null or is empty, then null is returned.

For example, ST_Distance could report the shortest distance an aircraft must travel between two locations. Figure 1 illustrates this information.