Treks can be filtered by portals, but not POI (cf. https://github.com/GeotrekCE/Geotrek-admin/issues/3043). One way to get roughly the same effect would be to spatially filter POI, assuming portals in the source DB have a spatial meaning (organizations that don't cover the same area).
Add possibility to enter a BBOX to filter POI directly in the API:
pros: less data fetched, performances improved;
cons: BBOX is not accurate
Add spatial filtering between API fetching and data processing:
pros: quite accurate spatial query, performances improved in data processing
cons: all POI are still downloaded
Another option would be to only download POI that are linked to a trek we fetch, through API poi/?trek=XXX route:
pros: filtering can't be more accurate
cons: from a performance point of view, this leads to as many API requests as there are treks...which is disastrous
Treks can be filtered by portals, but not POI (cf. https://github.com/GeotrekCE/Geotrek-admin/issues/3043). One way to get roughly the same effect would be to spatially filter POI, assuming portals in the source DB have a spatial meaning (organizations that don't cover the same area).
Add possibility to enter a BBOX to filter POI directly in the API:
Add spatial filtering between API fetching and data processing:
Another option would be to only download POI that are linked to a trek we fetch, through API
poi/?trek=XXX
route: