Add @distance for geo

Moved from GitHub dgraph/1559

Posted by davedbase:

It would be really great if there was a function to call and return distance between points or polygons. ie. @distance(PointA, PointB). If it were to return the result in meters that could be really, really handy!

paul-ylz commented :

Agreed, this would be awesome to facilitate sorting geo queries by distance to a particular point.

wildan2711 commented :

Just came across the need for this feature, in tandem with the near query, that would be cool.

wildroco commented :

any updates here?

I want to sort nodes by distance from fixed location. Is it possible without distance function?