http://franz.com/ns/allegrograph/3.0/geospatial/fn/cartesianDistanceSquared

<http://franz.com/ns/allegrograph/3.0/geospatial/fn/cartesianDistanceSquared>
( p1 p2 )

Returns the square of the Cartesian distance between the two points.

For example:

prefix geofn: <http://franz.com/ns/allegrograph/3.0/geospatial/fn/>
select ?distanceSquared {
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:cartesianDistanceSquared(?p1, ?p2) as ?distanceSquared)
}

p1 and p2 must both be bound to geospatial UPIs.

Notes

The following namespace abbreviations are used:

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