Skip to content

dist

Syntax

dist(site_id_1, site_id_2)

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.

Description

This action 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.

Note

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.

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)

See Also