ad-freiburg / pfaedle

Precise map-matching for public transit feeds. Generates high-quality GTFS shapes from OSM data.
GNU General Public License v3.0
208 stars 29 forks source link

OSM filtering: check if >0 GTFS feeds specified #26

Closed derhuerst closed 2 years ago

derhuerst commented 3 years ago

We're currently trying to use the -X OSM filtering feature for gtfs.mfdz.de.

We first ran with pfaedle -x DE-BW-buffered.osm.xml -X DE-BW-buffered.filtered.osm.xml, but noticed that the OSM filtering actually uses a bounding box computed from the passed GTFS feeds. We didn't pass any GTFS feeds and ended up with this bogus filtered OSM file:

<?xml version="1.0" encoding="UTF-8"?>

<osm>
    <bounds maxlat="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000" maxlon="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000" minlat="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000" minlon="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000" />

What do you think about letting pfaedle fail if 0 GTFS feeds have been provided?

patrickbr commented 3 years ago

I think the expected behavior is actually that the OSM file is completely filtered, that is if no GTFS feed is provided, the input feed is filtered to the bounding box of the input feed. I am actually surprised that this is not the current behavior. Will fix this.

patrickbr commented 2 years ago

Took a bit longer than expected, but filtering XML files without specifying a GTFS input feed should work as expected now.