<http://franz.com/ns/allegrograph/5.0/geo/nd/fn#haversineLatLonLatLon>
( lat1 lon1 lat2 lon2 &rest rest )

Returns the haversine distance between <lat1, lon1> and <lat2, lon2>. lat1, lon1, lat2, and lon2 specify two points in spherical coordinates and must be bound to numeric values.

For example:

PREFIX ndfn: <http://franz.com/ns/allegrograph/5.0/geo/nd/fn#>
PREFIX : <http://franz.com/ns/keyword#>
SELECT * {
bind(ndfn:haversineLatLonLatLon(38.889, -77.035, 38.889, -77.050, :km) as ?distance)
}

An optional fifth argument may be (default) or to specify the units of the result.

Notes

The following namespace abbreviations are used:

The SPARQL magic properties reference has additional information on using AllegroGraph magic properties and functions.