|
| 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 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 an |
| 31 | +existing planar graph to make it biconnected, while ensuring the graph remains planar. |
| 32 | + |
| 33 | +A graph is considered **biconnected** if it is connected and cannot be broken into |
| 34 | +disconnected pieces by deleting any single vertex (it has no articulation points). |
| 35 | +A planar graph is one that can be drawn in two-dimensional space with no two of |
| 36 | +its edges crossing. |
| 37 | + |
| 38 | +The main characteristics are: |
| 39 | + |
| 40 | +* Works for **undirected** graphs. |
| 41 | +* Works for **planar** graphs only. |
| 42 | +* If the input graph is not planar, it returns an **empty set**. |
| 43 | +* Returns a list of all new edges needed to make the graph biconnected. |
| 44 | +* The algorithm does not consider traversal costs in the calculations. |
| 45 | +* The algorithm does not consider geometric topology in the calculations. |
| 46 | +* Running time: :math:`O(|V_G| + |E_G|)` where :math:`G(V_G, E_G)` is the input graph. |
| 47 | + |
| 48 | +|Boost| Boost Graph Inside |
| 49 | + |
| 50 | +Signatures |
| 51 | +------------------------------------------------------------------------------- |
| 52 | + |
| 53 | +.. admonition:: \ \ |
| 54 | + :class: signatures |
| 55 | + |
| 56 | + | pgr_makeBiconnectedPlanar(`Edges SQL`_) |
| 57 | +
|
| 58 | + | Returns set of |result-component-make| |
| 59 | + | OR EMPTY SET |
| 60 | +
|
| 61 | +:Example: List of edges that are needed to make the graph biconnected planar. |
| 62 | + |
| 63 | +**Sample graph before:** |
| 64 | + |
| 65 | +.. figure:: /images/Fig6-undirected.png |
| 66 | + :scale: 50% |
| 67 | + |
| 68 | + Sample graph before |
| 69 | + |
| 70 | +**Output:** |
| 71 | + |
| 72 | +.. literalinclude:: makeBiconnectedPlanar.queries |
| 73 | + :start-after: -- q1 |
| 74 | + :end-before: -- q2 |
| 75 | + |
| 76 | +**Sample graph after adding biconnecting edges:** |
| 77 | + |
| 78 | +.. figure:: images/biconnected_planar_sampledata.png |
| 79 | + :scale: 75% |
| 80 | + |
| 81 | + Sample graph after adding biconnecting edges (olive = original edges, red dashed = 4 new biconnecting edges). |
| 82 | + 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. |
| 83 | + |
| 84 | +Parameters |
| 85 | +------------------------------------------------------------------------------- |
| 86 | + |
| 87 | +.. include:: pgRouting-concepts.rst |
| 88 | + :start-after: only_edge_param_start |
| 89 | + :end-before: only_edge_param_end |
| 90 | + |
| 91 | +Inner Queries |
| 92 | +------------------------------------------------------------------------------- |
| 93 | + |
| 94 | +Edges SQL |
| 95 | +............................................................................... |
| 96 | + |
| 97 | +.. include:: pgRouting-concepts.rst |
| 98 | + :start-after: basic_edges_sql_start |
| 99 | + :end-before: basic_edges_sql_end |
| 100 | + |
| 101 | +Result columns |
| 102 | +------------------------------------------------------------------------------- |
| 103 | + |
| 104 | +Returns set of |result-component-make| |
| 105 | + |
| 106 | +.. list-table:: |
| 107 | + :width: 81 |
| 108 | + :widths: auto |
| 109 | + :header-rows: 1 |
| 110 | + |
| 111 | + * - Column |
| 112 | + - Type |
| 113 | + - Description |
| 114 | + * - ``seq`` |
| 115 | + - ``BIGINT`` |
| 116 | + - Sequential value starting from **1**. |
| 117 | + * - ``start_vid`` |
| 118 | + - ``BIGINT`` |
| 119 | + - Identifier of the first end point vertex of the edge. |
| 120 | + * - ``end_vid`` |
| 121 | + - ``BIGINT`` |
| 122 | + - Identifier of the second end point vertex of the edge. |
| 123 | + |
| 124 | +Additional Examples |
| 125 | +------------------------------------------------------------------------------- |
| 126 | + |
| 127 | +:Example: Biconnecting a simple 4-vertex line graph (path graph). |
| 128 | + |
| 129 | +.. literalinclude:: makeBiconnectedPlanar.queries |
| 130 | + :start-after: -- q2 |
| 131 | + :end-before: -- q3 |
| 132 | + |
| 133 | +**Sample graph before:** |
| 134 | + |
| 135 | +.. figure:: images/biconnected_line_before.png |
| 136 | + :scale: 75% |
| 137 | + |
| 138 | + Sample 4-vertex line graph before biconnecting (vertices 2 and 3 are articulation points). |
| 139 | + |
| 140 | +**Output:** |
| 141 | + |
| 142 | +.. literalinclude:: makeBiconnectedPlanar.queries |
| 143 | + :start-after: -- q3 |
| 144 | + :end-before: -- q4 |
| 145 | + |
| 146 | +**Sample graph after adding biconnecting edges:** |
| 147 | + |
| 148 | +.. figure:: images/biconnected_line_after.png |
| 149 | + :scale: 75% |
| 150 | + |
| 151 | + Biconnected planar graph after adding edges (1,3) and (2,4) to eliminate articulation points without crossing. |
| 152 | + |
| 153 | +See Also |
| 154 | +------------------------------------------------------------------------------- |
| 155 | + |
| 156 | +* `Boost: make_biconnected_planar |
| 157 | + <https://www.boost.org/libs/graph/doc/make_biconnected_planar.html>`__ |
| 158 | +* :doc:`sampledata` |
| 159 | + |
| 160 | +.. rubric:: Indices and tables |
| 161 | + |
| 162 | +* :ref:`genindex` |
| 163 | +* :ref:`search` |
0 commit comments