GSoC 2026 Week 8 Report: Implementation of Planar Face Extraction and K-Core Decomposition Algorithms to pgRouting

Md Sakir Ahmed
Github id: sakirr05
Mentors: @cvvergara, @robe
Organization: OSGeo / pgRouting
OSGeo Profile: OSGeo Profile Link
Project Wiki: Github Wiki Link
Repository: Repo Link

Hello everyone,

This is my eighth weekly report of Official coding period for GSoC 2026

Week 8 Report (13 July ~ 19 July)

What did I get done this week?

This week focused on struct/type consistency fixes for pgr_planarFaces (char to int, seq handling) and on documentation correctness plus a major pgTAP coverage expansion for pgr_coreNumbers, aimed at exercising core numbers above the sampledata’s degeneracy of 2.

pgr_planarFaces - PR #600:

  • Removed seq from PlanarFace_rt struct and traced the consequences through the C layer; seq is now computed from call_cntr + 1, matching the pattern already used in pgr_coreNumbers
  • Changed the side field from char ('l'/'r') to int (1/2) across all layers: struct, FaceVisitor in planarFaces.hpp, Int32GetDatum in the C entry point, and OUT side INTEGER in the SQL wrapper
  • Updated pgtap/planar/planarFaces/edge_cases.pg to expect the new int values; updated doc/planar/pgr_planarFaces.rst (column table and prose, 5 locations) and regenerated docqueries/planar/planarFaces.result for the int side output

pgr_coreNumbers - PR #601:

  • Fixed a real bug in pgr_coreNumbers.rst’s second diagram two edges were mislabeled (6-10 shown as edge 3, 10-15 shown as edge 4, duplicating a label and skipping one); verified every edge label in the doc against live sampledata output and corrected the two wrong ones; also clarified the previously circular core column description
  • Added a new documentation example (K4 complete graph, all vertices core 3) with a docquery and regenerated docqueries/metrics/coreNumbers.result, since prior examples never went above core 2
  • Extended pgtap/metrics/coreNumbers/edge_cases.pg from 13 to 25 plans (suite total 80 → 92): added K4/K5 clique tests (core 3 / core 4), a K4-plus-pendant multi-level peeling test, tests confirming reverse_cost and cost magnitude are ignored, a test confirming node-ascending output order without an explicit ORDER BY, and degenerate-input tests for parallel edges, a self-loop, and disjoint components
  • Opened a design question on Discourse about multigraph input semantics (parallel edges and self-loops inflating core numbers); cvvergara pointed to the existing insert_min_edges_no_parallel helper (already used by Prim’s driver) as precedent for deduplicating parallel edges → discussion ongoing

Am I blocked on anything?

no

References:

1] Link to wiki page:
wiki page

2] Link to github repository:
github repository

3] Link to pull requests:
- PR #600 planarFaces (Week 8)
- PR #601 coreNumbers (Week 8)

4] Link to Discourse discussion:
- Multigraph input semantics for pgr_coreNumbers