From d5a640a2988c0c254ccc52ecb40684631754a701 Mon Sep 17 00:00:00 2001 From: Francia Csaba Date: Thu, 1 Feb 2024 14:12:02 +0100 Subject: [PATCH] only export routes in bbox --- amarillo/plugins/enhancer/services/gtfs_export.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amarillo/plugins/enhancer/services/gtfs_export.py b/amarillo/plugins/enhancer/services/gtfs_export.py index 9fd6d64..3f3a277 100644 --- a/amarillo/plugins/enhancer/services/gtfs_export.py +++ b/amarillo/plugins/enhancer/services/gtfs_export.py @@ -85,7 +85,8 @@ class GtfsExport: cloned_trips = dict(ridestore.trips) groups, cloned_trips = self.group_trips_into_routes(cloned_trips) for group in groups: - self.convert_route(group) + if self.bbox is None or any(trip.intersects(self.bbox) for trip in group.values()): + self.convert_route(group) for url, trip in cloned_trips.items(): # TODO: convert ridesharing info and driver data if self.bbox is None or trip.intersects(self.bbox):