3

In JanusGraph,there is some function like

 g.E().has('place', geoWithin(Geoshape.circle(37.97, 23.72, 50)))

to search place data. Now I want to use gremlinpython to do that,but I can't find the suitable API from the document.

ehds
  • 665
  • 1
  • 6
  • 16

2 Answers2

4

Gremlin does not yet support Geo data types and predicates. The bits of syntax that you are referencing are specific to JanusGraph and are part of its libraries. At this point, I don't believe that JanusGraph has a Python specific library to give you direct access to those things. If you need to use Geo searches then, for now, you will need to submit a Gremlin script to JanusGraph Server with that syntax.

stephen mallette
  • 45,298
  • 5
  • 67
  • 135
0

Something like this:

g.V().has('polygon',geoIntersect(Geoshape.point(55.70,37.55)))
Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
  • 1
    While this code may solve the question, [including an explanation](//meta.stackexchange.com/q/114762) of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please [edit] your answer to add explanations and give an indication of what limitations and assumptions apply. – Adrian Mole Oct 07 '21 at 16:32