cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to find route with gtfs and neo4j

n result, i want that the first trip that start at 6:00 and end at 7:36 from (JR Nara station → Kansai International Airport(KIX))
But shortest path algorithm return any randome trip start at 15:00 and end at 16:36 (any radome)
I can't add < condition as i don't know how many trip available for particular day.

https://www.narakotsu.co.jp/language/en/limousine/kix-nara.html

I want most nearest trip should be return in result

My query -

MATCH(s:Stop)--(st:Stoptime),
(e:Stop)--(et:Stoptime)
Where s.id in ["290003_01"]
and e.id in ["290003_05"]
and st.arrival_time > "05:03:00"
and st.departure_time > "05:03:00"
and et.stop_sequence > st.stop_sequence
and et.arrival_time > st.departure_time
match path = shortestpath((st)-->(et))
WHERE ALL (r IN relationships(path) WHERE type(r) = 'PRECEDES' OR type(r) = 'LOCATED_AT' OR type(r)='PART_OF')
return path limit 1


Data is an gtfs format
and i am using following model.
Can anyone help how can i optmized my query for this case

0 REPLIES 0