( p1 p2 )

Returns the distance between the two points in radians, according to the Haversine formula.

For example:

prefix geofn: <>
select ?distance {
bind(geofn:toPointLonLat(<http://ex#bar>, 56.0, 42.0) as ?p1 )
bind(geofn:toPointLonLat(<http://ex#bar>, 57.0, 42.5) as ?p2 )
bind(geofn:haversineRadians(?p1, ?p2) as ?distance)

p1 and p2 must both be bound to geospatial UPIs.


The following namespace abbreviations are used:

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