Hi everyone,
I'm new in Neo4j world, I'm trying to elaborate isochrones in very large DB 
created from osm datas and loaded into Neo4j.
Isochrones should be intended as: "All nodes reachable from a starting node 
within a certain time", in my db the nodes are for example the crossroads 
of a city and the relations are the streets with the time needed in minutes 
to go from a crossroad to another.
I wrote something like this in cypher 

MATCH (S) WHERE S.osm_id="1683208894" //to find the starting node 
MATCH path = (S)-[*0..75]->(E)  //to find all nodes connected with a max of 
hops of 75 relations, if I do not put a limit it will calculate every 
possible path for every possible node in a 10GB db... not the best..
WITH E,MIN( REDUCE(cost=0.0, r IN RELATIONSHIPS(path) | cost + 
toFloat(r.minutes)) ) AS cost //to calculate cost
WHERE cost<15 //if i want only the isochrones of 15 min
RETURN cost,collect(E) as isochrones
ORDER BY cost

The problem is that execution's time degenerate after 70 relations and 70 
is enough for isochrones of 12 minutes, I want to find at least 30 minutes 
isochrones.
Is that possible in Cypher without waiting a year?
Will be better if go for it by Java? Am I forced to write an apposite 
algorithm for this?

THANKS!
M.G.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to