--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,In current Neo4j releases the cypher support is limited to only the legacy indexes, and as Michael pointed out, the 'withinDistance' type queries you can use with the legacy index. However, your use case sounds like something entirely separate from this. I see no distance calculation need at all. You are only asking about connected edges between airports, correlated to knowledge about which countries those airports are in. In fact there is no need for Neo4j Spatial at all, because the knowledge of the country an airport belongs to is always known about all airports.Your graph model would have country nodes (no polygons required) and the airport nodes would be attached to the country nodes to which they belong. Edges between airports indicate routes. Then the two use cases you asked about would be solved like this:
- From what airports in Argentina is it possible to arrive to England
- MATCH (:Country {name:"Argentina"})<-[:IN]-(a:Airport)-[:ROUTE*1..2]-(:Airport)-[:IN]->(:Country {name:"England")"})
RETURN a.name;
- A list of route options that leave a US city, have one stop somewhere else and then arrive in Germany
None of the above requires Neo4j Spatial, or the import of any spatial information into the database at all.However, if you are especially interested in using Neo4j Spatial, and want to have queries that make use of country polygons, you will need to use the Java embedded API, which allows you to import polygons into the spatial index and perform queries on those. For your use case I do not see the need, so I will not describe that option further, unless you also suggest some use cases that do.Regards, Craig
On Thu, Feb 12, 2015 at 1:27 PM, fede martinez <federico...@gmail.com> wrote:
You received this message because you are subscribed to a topic in the Google Groups "Neo4j" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neo4j/dbbFZ-R78DI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neo4j+un...@googlegroups.com.