goat
goat copied to clipboard
GOAT-Core: Make PT catchment area endpoint smarter
Currently, as per the catchment area PT schema, only 1 origin point is supported as input (as individual points or an input layer). Additionally, within crud_catchment_area.py
and CRUDCatchmentAreaPT
, if multiple points are included within the request payload, these are only processed sequentially in a loop. This is partly due to the complexity of determining the origin point's relevant GTFS region and restricting R5 requests to use only one region at a time.
TODO:
- Study the possibility of supplying multiple origin points to R5 within the same request to produce a combined isochrone
- Fetch GTFS sub-region IDs for all origin points together
- Group all origin points within the same sub-region into one R5 request
- Make one R5 request per distinct GTFS sub-region supplying all origin points within that region
- While saving the resultant isochrones to database, combine the geometries (taking into account polygon_difference) to produce a single combined isochrone for all origin points