dist()

Returns the distance in kilometers between two sites.

Synopsis

dist(site_id_1, site_id_2)

Description

This function returns the distance in kilometers between two sites. The sites are identified by their site id. Returns the distance in km between the sites whose ids are represented by the arguments arg1 and arg2.

Parameters

arg1

The id of a location.

arg2

The id of another location.

Returns

The distance in kilometers between the two locations, as a decimal value.

Examples

If there are two locations with ids 000000001 and 000000002, then the distance between these two locations can be determined and stored in a user-defined variable test_distance with:

test_distance = dist(000000001, 000000002)

Notes

The distance returned by this expression is Cartesian distance, meaning that it is subject to distortion from the map projection used. If the geographic coordinates are far apart, the result may not be extremely accurate.

See Also

distance(), site