Problem/Motivation
Currently, ECA Geofield provides excellent support for some core PostGIS spatial operations, allowing site builders to automate workflows based on spatial relationships and geometry processing. However, it currently lacks support for network analysis and routing capabilities. Use cases such as finding the shortest path between two points, calculating routing costs, or determining driving distance polygons require custom development. Integrating pgRouting would significantly enhance the module's utility by unlocking advanced spatial network workflows directly within the ECA UI.
Proposed resolution
Integrate core pgrouting extension capabilities by introducing new ECA Action plugins. Specifically:
- Add ECA Actions for common pgRouting functions such as
pgr_dijkstra(shortest path) andpgr_drivingDistance(catchment areas). - Provide configuration fields within these actions allowing site builders to specify the routing topology (edge/node tables) and cost columns.
- Ensure the actions can accept Geofield inputs (e.g., start and end points) and output the routing results as valid geometries (e.g., a LineString for the route) so they can be processed by subsequent ECA actions or saved to an entity.
Remaining tasks
- Determine the initial set of pgRouting functions to support.
- Develop the ECA Action plugins for the selected functions.
- Write kernel/functional tests to verify the routing queries.
- Update module documentation, noting that the PostgreSQL
pgroutingextension is required to use these specific actions.
User interface changes
New actions will be available in the ECA Modeler UI under the "Geofield" category (e.g., "Geofield: Calculate shortest path (pgRouting)").
API changes
Addition of new Action plugin classes. No breaking changes to existing APIs.
Data model changes
No changes to the module's core data model. The topology tables required by pgRouting are assumed to be managed independently within the PostgreSQL database.
Comments