Hi,
Within an implementation covering multiple GTFS feeds, I'm looking to present the closest stops to a user on a map. Thinking about overall design and a few cases are thrown up
1) To initially determine if a feed is relevant for a user I am looking to see if the user's GPS coordinates lie within the rectangular bounds of the feed. To find the rectangular bounds of a feed you cycle through every stop in stops.txt to determine the minimum and maximum latitude and longitude.
- Is there a better easy way of doing this ?
- Would this work well in practice for most feeds (If for example the feed contained mostly local buses but there were a couple that went much further than the rest the model wouldn't be great) ?
- Is this box information already available for feeds online and if it is not has anybody written software to calculate the extremities which could be run against stops.txt ?
- Is it correct to assume that once you have worked out the box coordinates once for a given feed that they are unlikely to change much over time ?
2) When displaying stops closest to a user do you focus on a number of stops to display or stops within a certain distance or a combination of both ?
- No point display 10 stops if there are 20 within half a mile as all are reachable.
- If a stop close by covers a route no point displaying a stop further away if it does not cover additional routes
Anybody have a good algorithm for determining what to show ?
3) Any suggestions regarding mapping APIs ?
- Google is powerful and easy to use but from now needs sign up and is free to up a certain quota (I think). Going forward everything may be charged.
- Has Openstreet maps got easier for use for these type of applications.
- Other good ones
Thanks Paul.