GSoC 2026 Planar Face Extraction and K‐Core Decomposition - pgRouting/pgrouting GitHub Wiki

Table of Contents

Proposal

Brief Description

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.


State of the Project Before GSoC

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.


Deliverables

  • 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.

Detailed Proposal

Proposal link

Delivered: Link to PR or to Tag based on the final status

Participants

Title GitHub Handle Name
1st Mentor @cvvergara Vicky Vergara
2nd Mentor @robe2 Regina Obe
Student Developer @sakirr05 Md Sakir Ahmed

Timeline & weekly report

Note: in reverse order: the most recent is first

Second Coding Period

week 9 ### Week 9 Dates: (TBD)

Proposed: TDB copy of proposal timeline

Plan for the week:

  • TBD
  • TBD

Report:

  • foo
  • bar

Link to report mail

week 8 ### Week 8 Dates: (TBD)

Proposed: TDB copy of proposal timeline

Plan for the week:

  • TBD
  • TBD

Report:

week 7

Week 7

Dates: (TBD)

Proposed: TDB copy of proposal timeline

Plan for the week:

  • TBD
  • TBD

Report:

  • foo
  • bar

Link to report mail

week 6

Week 6

Dates: (June 29 ~ July 5)

Proposed: Finalize pgr_planarFaces() stabilization and integrate initial pgr_coreNumbers() implementation into pgRouting graph abstraction.

Plan for the week:

  • Finalize pgr_planarFaces() edge-case handling
  • Integrate standalone Batagelj–Zaversnik implementation with UndirectedGraph
  • Validate descriptor-space indexing and vertex ID mapping
  • Prepare midterm deliverables and mentor review notes

Report:

  • pgr_planarFaces() stabilized
  • pgr_coreNumbers() integrated with pgRouting graph pipeline
  • Vertex descriptor mapping validated
  • Midterm deliverables prepared

Link to report mail

week 5

Week 5

Dates: (June 22 ~ June 28)

Proposed: Begin standalone pgr_coreNumbers() implementation using Batagelj–Zaversnik decomposition.

Plan for the week:

  • Implement degree peeling logic
  • Implement bucket-sort structure for O(V+E)
  • Validate correctness on path, cycle, clique, and mixed graphs
  • Study duplicate-edge and self-loop handling behavior

Report:

  • Degree peeling logic implemented
  • Bucket-sort decomposition working
  • Core decomposition validated on test graphs
  • Edge-handling behavior documented

Link to report mail

week 4

Week 4

Dates: (June 15 ~ June 21)

Proposed: Documentation and stabilization for pgr_planarFaces() — complete pgTap tests, documentation, and validation on planar datasets.

Plan for the week:

  • Write pgTap edge_cases.pg
  • Write inner_query.pg, no_crash_test.pg, types_check.pg
  • Complete RST documentation and examples
  • Validate traversal correctness on larger planar graphs

Report:

  • pgTap edge_cases.pg completed
  • inner_query.pg completed
  • no_crash_test.pg completed
  • types_check.pg completed
  • Documentation completed

Link to report mail

week 3

Week 3

Dates: (June 8 ~ June 14)

Proposed: Integrate SQL wrappers and PostgreSQL result pipeline for pgr_planarFaces().

Plan for the week:

  • Implement SQL wrapper and SRF C wrapper
  • Implement PostgreSQL result tuple generation
  • Map Boost descriptors back to pgRouting IDs
  • Verify end-to-end SQL execution

Report:

  • SQL wrapper implemented
  • SRF C wrapper implemented
  • Vertex ID mapping working
  • End-to-end SQL execution verified

Link to report mail

week 2

Week 2

Dates: (June 1 ~ June 7)

Proposed: Implement planar face traversal logic and face recording workflow.

Plan for the week:

  • Implement FaceRecorderVisitor
  • Integrate planar_face_traversal()
  • Verify face boundary traversal on cycle and grid graphs
  • Study outer-face traversal behavior in detail

Report:

  • FaceRecorderVisitor implemented
  • planar_face_traversal() integrated
  • Face boundaries extracted correctly
  • Outer-face traversal behavior validated

Link to report mail

week 1

Week 1

Dates: (May 25 ~ May 31)

Proposed: Begin pgr_planarFaces() implementation — study embedding generation and integrate Boyer–Myrvold planarity testing with embedding storage.

Plan for the week:

  • Run boyer_myrvold_planarity_test with embedding storage enabled
  • Verify embedding vectors populate correctly on test graphs
  • Study EdgeIndexMap construction and embedding structure
  • Create Phase 1 file scaffolding and update CMakeLists.txt

Report:

  • Embedding generation verified on test graphs
  • EdgeIndexMap structure studied
  • Phase 1 file structure created
  • CMakeLists.txt updated

Link to report mail

Community Bonding Period

Bonding period

Goal: arrive at Week 1 with , proposal reviewed by mentors, study implementation of algorithms, and a clear understanding of pgRouting architecture.

Week -3 (May 19 ~ May 24)

Link to report mail

Week -2 (May 11 ~ May 18)

Proposed: Study planar face traversal behavior using Graphviz examples and Boost documentation.

Plan for the week:

  • Study boyer_myrvold_planarity_test embedding generation
  • Experiment with Graphviz planar graph examples
  • Research planar_face_traversal visitor 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_traversal workflow 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

Week -1 (May 1 ~ May 10)

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 report mail

Log of Pull Requests

Link to all the Pull Requests made in GSoC-pgRouting repository

Pull Request Description Date Status
# 1604 TBD TBD TBD

Slides

TBD

Final Report

TBD

  1. Links:

(i) Code Documentation:

TBD

(ii) Tags:

TBD

(iii) Pull Requests:

TBD

(iv) Wiki Pages:

TBD

  1. Images:

TBD

  1. Media:

TBD

References

⚠️ **GitHub.com Fallback** ⚠️