|
| 1 | +:file: This file is part of the pgRouting project. |
| 2 | +:copyright: Copyright (c) 2020-2026 pgRouting developers |
| 3 | +:license: Creative Commons Attribution-Share Alike 3.0 https://creativecommons.org/licenses/by-sa/3.0 |
| 4 | + |
| 5 | +.. index:: |
| 6 | + single: Planar Family ; pgr_makeBiconnectedPlanar - Experimental |
| 7 | + single: makeBiconnectedPlanar - Experimental on v4.1 |
| 8 | + |
| 9 | +| |
| 10 | +
|
| 11 | +``pgr_makeBiconnectedPlanar`` - Experimental |
| 12 | +=============================================================================== |
| 13 | + |
| 14 | +``pgr_makeBiconnectedPlanar`` — Returns the set of edges needed to make each connected component of a planar graph biconnected. |
| 15 | + |
| 16 | +.. include:: experimental.rst |
| 17 | + :start-after: warning-begin |
| 18 | + :end-before: end-warning |
| 19 | + |
| 20 | +.. rubric:: Availability |
| 21 | + |
| 22 | +.. rubric:: Version 4.1.0 |
| 23 | + |
| 24 | +* New experimental function. |
| 25 | + |
| 26 | + |
| 27 | +Description |
| 28 | +------------------------------------------------------------------------------- |
| 29 | + |
| 30 | +``pgr_makeBiconnectedPlanar`` identifies the missing edges that need to be added to each |
| 31 | +connected component of an existing planar graph to make those components biconnected, |
| 32 | +while ensuring the graph remains planar. |
| 33 | + |
| 34 | +A graph is considered **biconnected** if it is connected and cannot be broken into |
| 35 | +disconnected pieces by deleting any single vertex (it has no articulation points). |
| 36 | +A planar graph is one that can be drawn in two-dimensional space with no two of |
| 37 | +its edges crossing. |
| 38 | + |
| 39 | +The main characteristics are: |
| 40 | + |
| 41 | +* Works for **undirected** graphs. |
| 42 | +* Works for **planar** graphs only. |
| 43 | +* If any component of the input graph is not planar, no added edges are returned for that component. |
| 44 | +* Returns a list of all new edges needed to make each connected component of the graph biconnected. |
| 45 | +* The algorithm does not consider traversal costs in the calculations. |
| 46 | +* The algorithm does not consider geometric topology in the calculations. |
| 47 | +* Running time: :math:`O(|V_G| + |E_G| + R \log R)` where :math:`G(V_G, E_G)` is the input graph and :math:`R` is the number of returned edges. |
| 48 | + |
| 49 | +|Boost| Boost Graph Inside |
| 50 | + |
| 51 | +Signatures |
| 52 | +------------------------------------------------------------------------------- |
| 53 | + |
| 54 | +.. admonition:: \ \ |
| 55 | + :class: signatures |
| 56 | + |
| 57 | + | pgr_makeBiconnectedPlanar(`Edges SQL`_) |
| 58 | +
|
| 59 | + | Returns set of |result-component-make| |
| 60 | + | OR EMPTY SET |
| 61 | +
|
| 62 | +:Example: List of edges that are needed to make the graph biconnected planar. |
| 63 | + |
| 64 | +**Sample graph before:** |
| 65 | + |
| 66 | +.. figure:: /images/Fig6-undirected.png |
| 67 | + :scale: 50% |
| 68 | + |
| 69 | + Sample graph before |
| 70 | + |
| 71 | +**Output:** |
| 72 | + |
| 73 | +.. literalinclude:: makeBiconnectedPlanar.queries |
| 74 | + :start-after: -- q1 |
| 75 | + :end-before: -- q2 |
| 76 | + |
| 77 | +**Sample graph after adding biconnecting edges:** |
| 78 | + |
| 79 | +.. figure:: images/biconnected_planar_sampledata.png |
| 80 | + :scale: 75% |
| 81 | + |
| 82 | + Sample graph after adding biconnecting edges (olive = original edges, red dashed = 4 new biconnecting edges). |
| 83 | + Note: When a graph contains multiple disconnected components, each component is processed independently. Components (2,4) and (13,14) are already biconnected (0 articulation points) and require no new edges. |
| 84 | + |
| 85 | +Parameters |
| 86 | +------------------------------------------------------------------------------- |
| 87 | + |
| 88 | +.. include:: pgRouting-concepts.rst |
| 89 | + :start-after: only_edge_param_start |
| 90 | + :end-before: only_edge_param_end |
| 91 | + |
| 92 | +Inner Queries |
| 93 | +------------------------------------------------------------------------------- |
| 94 | + |
| 95 | +Edges SQL |
| 96 | +............................................................................... |
| 97 | + |
| 98 | +.. include:: pgRouting-concepts.rst |
| 99 | + :start-after: basic_edges_sql_start |
| 100 | + :end-before: basic_edges_sql_end |
| 101 | + |
| 102 | +Result columns |
| 103 | +------------------------------------------------------------------------------- |
| 104 | + |
| 105 | +Returns set of |result-component-make| |
| 106 | + |
| 107 | +.. list-table:: |
| 108 | + :width: 81 |
| 109 | + :widths: auto |
| 110 | + :header-rows: 1 |
| 111 | + |
| 112 | + * - Column |
| 113 | + - Type |
| 114 | + - Description |
| 115 | + * - ``seq`` |
| 116 | + - ``BIGINT`` |
| 117 | + - Sequential value starting from **1**. |
| 118 | + * - ``start_vid`` |
| 119 | + - ``BIGINT`` |
| 120 | + - Identifier of the first end point vertex of the edge. |
| 121 | + * - ``end_vid`` |
| 122 | + - ``BIGINT`` |
| 123 | + - Identifier of the second end point vertex of the edge. |
| 124 | + |
| 125 | +Additional Examples |
| 126 | +------------------------------------------------------------------------------- |
| 127 | + |
| 128 | +:Example: Biconnecting a simple 4-vertex line graph (path graph). |
| 129 | + |
| 130 | +.. literalinclude:: makeBiconnectedPlanar.queries |
| 131 | + :start-after: -- q2 |
| 132 | + :end-before: -- q3 |
| 133 | + |
| 134 | +**Sample graph before:** |
| 135 | + |
| 136 | +.. figure:: images/biconnected_line_before.png |
| 137 | + :scale: 75% |
| 138 | + |
| 139 | + Sample 4-vertex line graph before biconnecting (vertices 2 and 3 are articulation points). |
| 140 | + |
| 141 | +**Output:** |
| 142 | + |
| 143 | +.. literalinclude:: makeBiconnectedPlanar.queries |
| 144 | + :start-after: -- q3 |
| 145 | + :end-before: -- q4 |
| 146 | + |
| 147 | +**Sample graph after adding biconnecting edges:** |
| 148 | + |
| 149 | +.. figure:: images/biconnected_line_after.png |
| 150 | + :scale: 75% |
| 151 | + |
| 152 | + Biconnected planar graph after adding edges (1,3) and (2,4) to eliminate articulation points without crossing. |
| 153 | + |
| 154 | +See Also |
| 155 | +------------------------------------------------------------------------------- |
| 156 | + |
| 157 | +* `Boost: make_biconnected_planar |
| 158 | + <https://www.boost.org/libs/graph/doc/make_biconnected_planar.html>`__ |
| 159 | +* :doc:`sampledata` |
| 160 | + |
| 161 | +.. rubric:: Indices and tables |
| 162 | + |
| 163 | +* :ref:`genindex` |
| 164 | +* :ref:`search` |
0 commit comments