Distance between 2 Latitudes and Longitudes using Haversine formula

Calculates the distance in kilometers (km) between 2 sets of latitudes and longitudes. This is meant so that no additional extensions are required, and uses basic Knime nodes.

The distance is calculated using the Haversine Formula. It also assumes that the Earth radius is 6,371 km.

The resources used for the formula and Earth radius:
Earth radius: https://en.wikipedia.org/wiki/Earth_radius
Haversine forumula: https://en.wikipedia.org/wiki/Haversine_formula

Among the columns of the Input table should be 4 columns of type Double for 2 sets of latitudes and longitudes values.

The column names do not matter as the component allows you to choose which columns represents the 2 sets of latitudes and longitudes columns

Author: @bruno29a

Options

Choose the Latitude 1 column
Enter Description
Choose the Longitude 1 column
Enter Description
Choose the Latitude 2 column
Enter Description
Choose the Longitude 2 column
Enter Description

Input Ports

Icon
Table including 2 latitudes columns and 2 longitudes columns

Output Ports

Icon
Table with input columns and an additional column containing the distance

Nodes

Extensions

Links