Skip to contents

Calculate the great-circle distance between two lat/lon points

Usage

distance_greatcircle(lat1, lon1, lat2, lon2)

Arguments

lat1

numeric; starting latitude coordinate(s)

lon1

numeric; starting longitude coordinate(s)

lat2

numeric; ending latitude coordinate(s)

lon2

numeric; ending longitude coordinate(s)

Value

Distance in kilometers between lat1/lon1 and lat2/lon2