Geolocation search with Gremlin

最后都变了- 提交于 2020-04-14 07:07:06

问题


Is it possible to do a location search in Gremlin? I can't see how it can be done in the documentation. I specifically want to do the location search in Cosmos Gremlin.


回答1:


Geo location currently is something that is provided by the back end graph system. For example JanusGraph has a GeoSpatial API that can be used with Gremlin. Of course if you store lat/lon coordinates in your graph you can pretty easily write a Gremlin query to use those to look for things based on coordinates.

I have a few examples of doing it manually in section 5.3.8 of the Gremlin tutorial I am writing. Available here: https://github.com/krlawrence/graph




回答2:


There's also a nice Azure Cosmos DB - Graph Api application demo created by Antony Chu which practically does that.

https://github.com/anthonychu/cosmosdb-gremlin-flights

The application is mainly built in 2 parts

-A Console Application which defines Airport object model - Code, Name, GeoCoordinate Coordinate... and generates long/lat coordinates nodes as Vertex.

-An Asp.NET MVC Web application which mainly uses a Bing Map in UI to display Airport nodes from Vertex coordinates and defines linked routes through Edges parameters in GetRoutes function. Hope this helps.



来源:https://stackoverflow.com/questions/48145899/geolocation-search-with-gremlin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!