grote / osm2gtfs

Turn OpenStreetMap data and schedule information into GTFS
GNU General Public License v3.0
99 stars 31 forks source link

Implement included_lines and excluded_lines in standard trip creator or OsmConnector #117

Open ialokim opened 6 years ago

ialokim commented 6 years ago

The current PR #99 (Data structure) lacks the implementation of Schedule's excluded_lines and included_lines.

@AltNico raised the idea of implementing this function already while querying OSM data from the Overpass API to reduce network traffic and memory usage.

pantierra commented 6 years ago

In my opinion this should be done in a custom trips creator (current implementation) and not come from a schedule source.

I think this has nothing to do with schedule. If we need it to be configurable I would put it into the config file. But I think it should not be covered by standard behaviour.

ialokim commented 6 years ago

I think this has nothing to do with schedule. If we need it to be configurable I would put it into the config file. But I think it should not be covered by standard behavior.

I'm okay if we move it to the Configuration, but why not supporting it out of the box? At least for our Nicaraguan GTFS, it would be very useful.

pantierra commented 6 years ago

In my opinion it is just not the appropriate place. Why would you do that? Can you give a reasoning?

As far as I see, it is an information that specifies on particular GTFS (for any reason) to omit certain lines coming from the data base. As far as I see this is most typical configuration and hasn't to do with schedule or time information.

ialokim commented 6 years ago

As far as I see this is most typical configuration and hasn't to do with schedule or time information.

Yes, you are right, but why not supporting it within the config.json out of the box?

pantierra commented 6 years ago

Sure, to put the excluded lines into the config file and handle it in the standard creators seems to me also the right way to go.

Why do you need "included_lines"?

ialokim commented 6 years ago

Why do you need included_lines?

Not sure if this is very specific to our Nicaraguan case, but we have a lot of bus services mapped in the NI (national) network we don't have any schedule information yet.

As you can see here, instead of excluding all the lines we don't have schedule information (and update this key every time someone added a new line and we want to rerun osm2gtfs), we wanted to explicitly include only the lines we want in our GTFS.

ialokim commented 6 years ago

Thinking about it another time, I'm not very sure anymore whether this option is really needed: included_lines could be deduced from all the lines given in the schedule.json and excluded_lines shouldn't even be present in schedule.json.

The only option I see we could implement to improve things related to this issue, would be only querying the lines present in schedule.json from the OSM servers.