GSoC 2026 Week 4 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 fourth weekly report of Official coding period for GSoC 2026

Week 4 Report (15 June ~ 21 June)

What did I get done this week?

Created Week 4 branches and pull requests following the weekly PR workflow (week4-planarFaces – PR #577, week4-coreNumbers – PR #576), both targeting their respective Week 3 bases.

pgr_planarFaces (PR #577):

  • Week 3 implementation was already complete (algorithm, 3-layer architecture, docqueries, pgtap tests); Week 4 focused on documentation polish
  • Enhanced pgr_planarFaces.rst with a clearer description of faces, guidance to run pgr_isPlanar first, and an Explanation section after the main example
  • Added Additional Examples: planarity check before face extraction, and a triangle graph example (2 faces, 6 rows)
  • Extended docquery files (planarFaces.pg and planarFaces.result) with q2 (isPlanar check) and q3 (triangle example); docquery tests pass

pgr_coreNumbers (PR #576):

  • Switched return type from custom CoreNumbers_rt to shared II_t_rt (d1 - node, d2 - core; seq generated in the C SRF layer), matching the connectedComponents / metrics module pattern
  • Removed include/c_types/coreNumbers_rt.h and updated all process, driver, and algorithm layers accordingly
  • Implemented k-core decomposition manually using the Batagelj–Zaversnik algorithm (k-core is not available in Boost Graph Library; Boost used only for graph construction and adjacency)
  • Addressed mentor review feedback on the algorithm: renamed degdegree, extracted bin_sort_vertices() helper, used std::max_element() for max-degree lookup
  • Added partial RST documentation (pgr_coreNumbers.rst) and registered it in doc/metrics/CMakeLists.txt and metrics-family.rst
  • Created docquery files (coreNumbers.pg and coreNumbers.result) with correct BEGIN/ROLLBACK wrapper format
  • Added initial pgtap tests: types_check.pg and no_crash_test.pg (both passing)
  • All CI checks passing on the Week 4 PR

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 #577 planarFaces (Week 4)
- PR #576 coreNumbers (Week 4)
- PR #568 planarFaces (Week 3, merged)
- PR #567 coreNumbers (Week 3, merged)