grote/osm2gtfs

Move Fenix specific code to Fenix classes

Closed this issue · 5 comments

grote commented
Move Fenix specific code to Fenix classes

Cool. This would be great support in preparation of #30.

After pull request #43 I see almost all functions in Stop, Route, RouteMaster and BaseRoute to be Fenix specific.

Only those one's aren't Fenix specific:

Stop.get_center_of_nodes()
Route.print_shape_for_leaflet()

And probably we want to implement one more generic function like:

Route.get_stop_by_position(int) instead of Route.get_first_stop()

After pull request #44 (Default implementation for stops creation): If TripsCreatorFenix logic implemented pulling Stop objects from data.stops based on the stop ids in Route.stops, then Fenix could use the default StopsCreator implementation and get rid of the StopsCreatorFenix 👍

grote commented

Route.print_shape_for_leaflet()

This one is actually just a debugging function that I used during development. You can show the route on a leaflet map and inspect it in detail. Do you think we should keep this?

And probably we want to implement one more generic function like:

Route.get_stop_by_position(int) instead of Route.get_first_stop()

Yup, that's fine with me. Would be a fairly small pull request.

Route.print_shape_for_leaflet()

This one is actually just a debugging function that I used during development. You can show the route on a leaflet map and inspect it in detail. Do you think we should keep this?

I actually was thinking about creating a Debug class for this and more debug functionality. Here is a separate issue for this: #46