I have followed the Geo-Traversal documentation(DSE 6.7) and was able to find all the cities (points) within a radius from a particular location,
g.V(). has('location', 'point', Geo.inside(Geo.point(2.352222, 48.856614), 300, Geo.Unit.KILOMETERS)). values('name')
But I am unable to sort them by distance from the centerpoint,
g.V().has('place', 'location', Geo.inside(Geo.point(74.0,40.5),50,Geo.Unit.DEGREES)). order().by{it.value('location').getOgcGeometry().distance(Geo.point(2.352222, 48.856614).getOgcGeometry())}
This is the link to the documentation, https://docs.datastax.com/en/dse/6.7/dse-dev/datastax_enterprise/graph/using/queryGeospatial.html
Can anyone please help me figure out this gremlin query?