goat-community / goat

This is the home of Geo Open Accessibility Tool (GOAT)
GNU General Public License v3.0
88 stars 47 forks source link

GOAT-Core: Make PT catchment area endpoint smarter #3056

Open nihar1024 opened 1 week ago

nihar1024 commented 1 week ago

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:

  1. Study the possibility of supplying multiple origin points to R5 within the same request to produce a combined isochrone
  2. Fetch GTFS sub-region IDs for all origin points together
  3. Group all origin points within the same sub-region into one R5 request
  4. Make one R5 request per distinct GTFS sub-region supplying all origin points within that region
  5. 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