Re: Geo Mapping. How to index/query a non-point geo property?


Hi Dmitry,

Here you go again:

g.addV().property('location', Geoshape.line([[52, 0] as double[], [52, 2] as double[]]))

21:09:39 WARN  org.janusgraph.graphdb.transaction.StandardJanusGraphTx  - Query requires iterating over all vertices [()]. For better performance, use indexes
==>[id:4240,label:vertex,location:LINESTRING (52 0, 52 2)]

gremlin> g.V().has("location", geoWithin(, 52, 200.0))).elementMap()
==>[id:4240,label:vertex,location:LINESTRING (52 0, 52 2)]

gremlin> g.V().has("location", geoContains(Geoshape.point(1, 52)))

As you see, the coordinate order conventions are really warped. This may have led you believe things do not work. I had to find this out too ... Still do not not know which coordinate is latitude and which one longitude :-)

If you want, you can make an issue of it, because the coordinate order for the geoWithin predicate is different for Geoshape.point and!

Best wishes,    Marc

Join to automatically receive all group messages.