GEO.DISTANCE

GEO.DISTANCE calculates the distance (in Km) for the path described as a list of latitude/longitude points. Each point must be a tuple of two floats.

Function category: Geo

Syntax

GEO.DISTANCE(path)

Arguments

Description

path

Collection of geospatial coordinates.

Example

Example 1: Total distance between three locations (in Km)

Let's say we know the latitude and longitude values for three cities:

Berlin, Germany:

52.520008, 13.404954

New York, United States:

40.730610, -73.935242

Tokyo, Japan:

35.652832, 139.839478

Find the total distance between the three cities using GEO.DISTANCE:

GEO.DISTANCE({{52.520008, 13.404954}, {40.730610, -73.935242}, {35.652832, 139.839478}})

This results in the following total distance:

17227.1086650486