GSoC 2026 Planar Face Extraction and K‐Core Decomposition - pgRouting/pgrouting GitHub Wiki
This project aims to implement Planar Face Extraction and K-Core Decomposition algorithms from the Boost Graph Library into pgRouting. These algorithms extend pgRouting’s capabilities in structural graph analysis.
Planar face extraction identifies the bounded regions (faces) formed by edges in a planar graph, which is useful for applications such as road network partitioning and spatial analysis. K-core decomposition assigns a core number to each vertex, representing its level of connectivity within the graph, and is widely used in network analysis and clustering.
By integrating these algorithms, pgRouting will support more advanced graph analysis directly within PostgreSQL, enabling efficient processing of large-scale geospatial and network data.
Currently, pgRouting does not provide functions for planar face extraction or k-core decomposition. While planar face extraction algorithms is available in the Boost Graph Library also k-core decomposition would be implemented from sctratch with standalone function, they have not yet been integrated into pgRouting.
This project will bridge that gap by implementing these algorithms within pgRouting’s existing architecture and exposing them through SQL interfaces.
- Implementation of
pgr_planarFaces()function. - Implementation of
pgr_coreNumbers()function. - Integration with Boost Graph Library algorithms.
- SQL interface for both functions.
- User documentation for the new functions.
- pgTap test cases to ensure correctness and stability.
- A wiki page documenting weekly progress.
- Final and evaluation reports.
Delivered: Link to PR or to Tag based on the final status
| Title | GitHub Handle | Name |
|---|---|---|
| 1st Mentor | @cvvergara | Vicky Vergara |
| 2nd Mentor | @robe2 | Regina Obe |
| Student Developer | @sakirr05 | Md Sakir Ahmed |
Note: in reverse order: the most recent is first
week 12
Dates: (August 10 ~ August 16)
Proposed: Final project polishing, retrospective cleanup, and post-review integration validation.
week 11
Dates: (August 3 ~ August 9)
Proposed: Finalize merge-ready stabilization, rebasing, and review resolution.
week 10
Dates: (July 27 ~ August 2)
Proposed: Perform large-scale validation and review-driven stabilization for both features.
week 9
Dates: (July 20 ~ July 26)
Proposed: Complete documentation, validation, and integration cleanup for both algorithms.
week 8
Dates: (July 13 ~ July 19)
Proposed:
Stabilize pgr_coreNumbers() implementation with pgTap validation, benchmarks, and CI compatibility fixes.
week 7
Dates: (July 6 ~ July 12)
Proposed:
Integrate PostgreSQL wrappers and SQL result pipeline for pgr_coreNumbers().
week 6
Dates: (June 29 ~ July 5)
Proposed:
Begin standalone pgr_coreNumbers() implementation using Batagelj–Zaversnik decomposition integrated with pgRouting graph structures.
week 5
Dates: (June 22 ~ June 28)
Proposed:
Finalize pgr_planarFaces() review-ready integration and begin pgr_coreNumbers() architecture preparation.
week 4
Dates: (June 15 ~ June 21)
Proposed:
Stabilize pgr_planarFaces() integration and complete validation/testing workflow.
week 3
Dates: (June 8 ~ June 14)
Proposed: Begin PostgreSQL integration for pgr_planarFaces() with minimal wrapper and result pipeline support.
-
Revised plan:
- Restructure
pgr_planarFacesto 3-layer process/driver architecture - Add documentation and docqueries for
pgr_planarFaces - Fix
pgr_coreNumbersSQL and copyright issues
- Restructure
-
Work Done:
- pgr_planarFaces #568:
- Restructured algorithm to 3-layer process/driver architecture matching
dijkstra,astar,spanningTree,coloring, andorderingmodules - Created algorithm-specific
planarFaces_process.cppandplanarFaces_driver.cppfor SPI connection, timing, error reporting, edge fetching, and graph construction - Updated
planarFaces.cto callpgr_process_planarFaces()instead of directly calling the driver - Created RST documentation (
pgr_planarFaces.rst) and added to experimental toctree - Created docquery files (
planarFaces.pgandplanarFaces.result) with correct BEGIN/ROLLBACK wrapper format - Fixed cpplint errors (include ordering, missing
<utility>header) - Refactored from shared
planar_process/planar_driverto algorithm-specific files to avoid return type conflicts (PlanarFace_rtvsII_t_rt) with other planar algorithms - All CI checks passing- build, pgtap tests, docqueries, and cpplint
- Restructured algorithm to 3-layer process/driver architecture matching
- pgr_coreNumbers #567:
- Fixed
_coreNumbers.sqlLANGUAGE property fromIMMUTABLEtoVOLATILEto matchbetweennessCentralitypattern - Corrected copyright years in
coreNumbers.hppandcoreNumbers.cpp - All CI checks passing
- Fixed
- pgr_planarFaces #568:
week 2
Dates: (June 1 ~ June 7)
Proposed: Implement core planar face traversal logic and face recording workflow in isolated C++ prototypes.
-
Revised plan:
- Implement
pgr_planarFacesalgorithm and add pgtap tests - Move
pgr_coreNumbersfiles tometrics/module and fix naming conventions
- Implement
-
Work Done:
- Attended Monday meeting where mentor Vicky reviewed Week 1 PRs and gave feedback on file structure and naming conventions
-
pgr_planarFaces (PR #563):
- Implemented face traversal algorithm using Boost's
boyer_myrvold_planarity_testandplanar_face_traversalwith a customFaceVisitorthat recordsseq,face_id,edge_id,side - Rewrote driver and C SRF entry to follow the planar module pattern (matching
isPlanar/boyerMyrvold) - Removed old
planarFaces_process.cppandplanarFaces_driver.hpp— replaced with new driver pattern - Fixed file naming convention - removed incorrect
pgr_prefix from filenames to match planar directory - Added 4 pgtap test files (69 tests total):
edge_cases.pg(6),types_check.pg(4),no_crash_test.pg(5),inner_query.pg(54) - Verified algorithm output against real PostgreSQL database - all 69 tests pass locally and in CI
- Implemented face traversal algorithm using Boost's
-
pgr_coreNumbers (PR #564):
- Relocated all coreNumbers files from standalone
coreNumbers/directory intometrics/module (alongsidebetweennessCentralityandbandwidth) - Renamed files to follow metrics naming convention - removed
pgr_prefix, renamed_process.h→_driver.h,_driver.hpp→.hpp - Updated build configs:
src/metrics/CMakeLists.txt,sql/metrics/CMakeLists.txt,configuration.conf,code_checker.sh - Fixed driver header, SQL files, and C SRF entry to follow
betweennessCentralitypattern
- Relocated all coreNumbers files from standalone
week 1
Dates: (May 25 ~ May 31)
Proposed:
Study existing pgr_isPlanar() infrastructure and integrate Boyer–Myrvold embedding generation with reusable embedding storage for pgr_planarFaces().
-
Revised plam:
- Create skeleton file struture for
pgr_planarFaces - Create skeleton file structure for
pgr_coreNumbers - Follow the process-driver pattern shown by mentor
- Create skeleton file struture for
-
Work Done:
- Had a Monday meeting where my mentor Vicky showed how to create skeleton files using Dijkstra as example (PR #548, PR #549)
- Had exams so couldnt work till Thursday
- Made first attempt at
pgr_planarFacesskeleton (PR #551) but most CI checks were failing and the commit history got too messy so I closed it and started fresh - Rebuilt both skeletons from scratch:
- SQL layer: internal C stub + public wrapper
- C layer: PostgreSQL SRF entry point
- C++ layer: process layer + driver stub
- Build system: CMakeLists, configuration.conf, sig file
-
PR #556 for
pgr_planarFaces, all CI checks passing -
PR #555 for
pgr_coreNumbers, had one issue where the sig file entries were in the wrong position (recieved query check failure), fixed the sort order and all checks passed after that
Bonding period
Goal: arrive at Week 1 with , proposal reviewed by mentors, study implementation of algorithms, and a clear understanding of pgRouting architecture.
Proposed: Study pgRouting architecture and refine implementation strategy after deeper analysis of planar traversal and k-core decomposition workflows.
Plan for the week:
- Research outer-face traversal handling and visitor traversal order
- Investigate standalone implementation strategy for
pgr_coreNumbers() - Study pgRouting SQL → C wrapper → C++ driver → Boost integration pipeline
- Research Batagelj–Zaversnik k-core decomposition workflow
Report:
- Bonding period meeting
- Prepared Wiki (copied from proposal)
- Revised proposal timeline and implementation strategy
- Research about
planar_face_traversalvisitor workflow and outer-face handling - Investigated standalone
pgr_coreNumbers()implementation feasibility - Studied pgRouting execution pipeline and Boost graph integration workflow
- Researched Batagelj–Zaversnik degree-peeling decomposition process
Proposed: Study planar face traversal behavior using Graphviz examples and Boost documentation.
Plan for the week:
- Study
boyer_myrvold_planarity_testembedding generation - Experiment with Graphviz planar graph examples
- Research
planar_face_traversalvisitor workflow - Study pgRouting SQL → C wrapper → C++ driver → Boost pipeline
- Revise implementation approach after architecture study
Report:
- Studied Graphviz planar traversal examples
- Researched
planar_face_traversalworkflow and visitor behavior - Investigated outer-face traversal handling using Boost documentation and Graphviz experiments
- Studied pgRouting execution pipeline (SQL → C wrapper → C++ driver → Boost)
- Restructured proposal after deeper architecture study
- Planned standalone
pgr_coreNumbers()implementation approach - Researched core-number computation workflow and graph abstraction integration
- Explored Boost Graph Library references related to k-core decomposition
- Created discussion notes/questions regarding traversal behavior and implementation details
Plan for the week:
- Bonding period meeting with mentors
- Prepare GSoC wiki structure from proposal
- Revise proposal after deeper algorithm research
- Research outer-face handling during planar traversal
- Study third algorithm/stretch-goal feasibility as homework
Report:
- Bonding period meeting completed
- GSoC wiki prepared from proposal
- Proposal revision and implementation planning started
- Outer-face traversal behavior researched
- Third algorithm/stretch-goal research in progress
Link to all the Pull Requests made in GSoC-pgRouting repository
| Pull Request | Description | Date | Status |
|---|---|---|---|
| #551 | Week1: pgr_planarFaces skeleton (closed) | May 28, 2026 | Closed |
| #555 | Week1: pgr_CoreNumbers skeleton | May 29, 2026 | Open |
| #556 | Week1: pgr_planarFaces skeleton | May 29, 2026 and May 30, 2026 | Open |
TBD
TBD
- Links:
(i) Code Documentation:
TBD
(ii) Tags:
TBD
(iii) Pull Requests:
TBD
(iv) Wiki Pages:
TBD
- Images:
TBD
- Media:
TBD
- pgRouting Documentation -- https://docs.pgrouting.org/
- Diagram tools -- Diagrams were created using Python (NetworkX + Matplotlib) and Draw.io
- Boost Graph Library -- https://www.boost.org/doc/libs/release/libs/graph/
- Planar Face Traversal (Boost) -- https://www.boost.org/doc/libs/release/libs/graph/doc/planar_face_traversal.html
- Boyer-Myrvold Planarity Test (Boost) -- https://www.boost.org/doc/libs/release/libs/graph/doc/boyer_myrvold.html
- Batagelj, V. and Zaversnik, M.
An O(m) Algorithm for Cores Decomposition of Networks.
arXiv:cs/0310049, 2003. - OSGeo GSoC Guidelines -- https://wiki.osgeo.org/wiki/Google_Summer_of_Code