Search code examples
gremlintinkerpoptinkerpop3amazon-neptunegremlinpython

Geolocation distance with AWS Neptune?


I'm trying to use Amazon Neptune, in my gremlin query I need to filter nearby users and also filter by other relationships, similar to what Tinder (a dating app) does. So I need a geolocation distance calculation into the query. I can't find that feature into the tinkerpop documentation or Neptune documentation. Is it possible to do this? I'm looking for something like "Spatial functions" of Neo4j

Luckily I didn't started the development and didn't decide what DB engine I want to use so if I can't code with this basic tool I'm going to use Neo4j instead of AWS Neptune

Edit: This question has been linked in the comments but does not contain the answer: Geolocation search with Gremlin

I want to know how to make geolocation queries with AWS Neptune


Solution

  • have you looked at this section of Kelvin's book that describes how to do a geolocation search in gremlin? It describes that essentially you capture the longitude and latitude as properties in vertices and then just treat them as long's in your queries.

    I am invested into Neptune and will also need to do some simple proximity geospatial searching, though have only gotten as far as capturing lat and long.

    I'll want to do something like, find all the vertices that are within ten miles of a point. So I'll use some geospatial library to determine the boundaries of the search and use those numbers in the query.