-
-
Notifications
You must be signed in to change notification settings - Fork 376
Removing use of pgr_analyzeGraph on the documentation #2822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing use of pgr_analyzeGraph on the documentation #2822
Conversation
WalkthroughThe changes update several documentation, configuration, and SQL files. In the JavaScript history file, a new version (3.8) is appended for the Changes
Sequence Diagram(s)sequenceDiagram
participant Query as SQL Script
participant Intersect as Intersections Table
participant Vertices as Vertices Table
participant Edges as Edges Table
Query->>Intersect: Compute intersections using ST_Intersection
Query->>Vertices: Filter vertices with CTE (e.g., vertices with single connection)
Query->>Query: Call pgr_nodeNetwork with intersection filter
Query->>Edges: Update edges (set source/target using geometrical data)
Query->>Edges: Insert new edges with computed costs (using new CTE for fractions)
Query->>Edges: Delete edges identified in intersections
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
Note 🎁 Summarized by CodeRabbit FreeYour organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.If you believe this is a mistake and have available seats, please assign one to the pull request author through the subscription management page using the link above. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (2)
doc/topology/images/after_node_net.png
is excluded by!**/*.png
doc/topology/images/before_node_net.png
is excluded by!**/*.png
📒 Files selected for processing (11)
doc/_static/page_history.js
(1 hunks)doc/topology/CMakeLists.txt
(0 hunks)doc/topology/images/CMakeLists.txt
(0 hunks)doc/topology/pgr_analyzeOneWay.rst
(1 hunks)doc/topology/pgr_createTopology.rst
(1 hunks)doc/topology/pgr_createVerticesTable.rst
(1 hunks)doc/topology/pgr_nodeNetwork.rst
(1 hunks)docqueries/topology/nodeNetwork.pg
(1 hunks)docqueries/topology/nodeNetwork.result
(1 hunks)locale/en/LC_MESSAGES/pgrouting_doc_strings.po
(4 hunks)locale/pot/pgrouting_doc_strings.pot
(4 hunks)
💤 Files with no reviewable changes (2)
- doc/topology/images/CMakeLists.txt
- doc/topology/CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Check queries
🔇 Additional comments (20)
locale/en/LC_MESSAGES/pgrouting_doc_strings.po (4)
11-11
: Timestamp update looks good.This is a routine update to the POT-Creation-Date timestamp, reflecting when the translation template was generated.
9998-9999
: Text properly updated to reference only analyzeOneWay.Good job removing references to the deprecated
pgr_analyzeGraph
function and correctly updating the documentation to focus onpgr_analyzeOneWay
as the relevant function for the vertices table requirement.
13404-13459
: Appropriate replacement of analyzeGraph with topology analysis instructions.The new content effectively replaces the deprecated
pgr_analyzeGraph
functionality with more specific instructions on how to:
- Analyze the network for intersections and gaps
- Fix topology issues like intersections and gaps
- Update source and target information
- Manage the vertex topology
This change aligns well with the PR objective of removing
pgr_analyzeGraph
while still providing users with the necessary guidance for topology analysis.
18039-18041
: Section header addition looks good.Adding the "Images" section header improves the documentation structure by properly categorizing the visual content that follows.
locale/pot/pgrouting_doc_strings.pot (5)
11-11
: LGTM: POT file creation date updated.The POT-Creation-Date has been properly updated to reflect when the template was regenerated.
8584-8584
: LGTM: Successfully removed pgr_analyzeGraph reference.The text has been appropriately updated to only mention that the vertices table is a requirement for the
pgr_analyzeOneWay
functions, removing the reference to the deprecatedpgr_analyzeGraph
function.
11386-11389
: LGTM: New replacement content for topology analysis.These new instructions for analyzing networks for intersections and gaps provide appropriate alternatives to the deprecated
pgr_analyzeGraph
function.
11431-11431
: LGTM: Updated See Also section.The "See Also" section has been properly updated to reference related topology functions without mentioning the deprecated
pgr_analyzeGraph
.
15118-15120
: LGTM: Added Images section header.The addition of an "Images" header improves the documentation organization.
doc/_static/page_history.js (1)
226-228
: Version parameter added for pgr_analyzeOneWay.The modification adds version 3.8 as the removal date parameter for the
pgr_analyzeOneWay
function entry in the file history. This correctly aligns with the PR objective of removingpgr_analyzeGraph
from documentation.doc/topology/pgr_analyzeOneWay.rst (1)
124-125
: Documentation cleanup: References to pgr_analyzeGraph removed.The descriptions for the
cnt
andchk
fields have been appropriately simplified to remove references to the deprecatedpgr_analyzeGraph
function while maintaining the essential information about each field's purpose.doc/topology/pgr_createVerticesTable.rst (2)
94-95
: Documentation update: Dependency reference removed.The vertices table requirements section has been correctly updated to remove references to the deprecated
pgr_analyzeGraph
function, leaving onlypgr_analyzeOneWay
as the function requiring this table.
100-102
: Field descriptions simplified.The descriptions for the
cnt
andchk
fields have been appropriately updated to remove references to the deprecatedpgr_analyzeGraph
function while preserving their functional descriptions.doc/topology/pgr_createTopology.rst (2)
107-108
: Documentation update: Function dependency removed.The vertices table requirements section has been correctly updated to remove references to the deprecated
pgr_analyzeGraph
function, now indicating that the vertices table is only a requirement forpgr_analyzeOneWay
.
114-115
: Field descriptions simplified.The descriptions for the
cnt
andchk
fields have been appropriately updated to remove references to the deprecatedpgr_analyzeGraph
function while maintaining their essential descriptions.docqueries/topology/nodeNetwork.pg (3)
18-19
: Verify potential SQL injection risk.The query dynamically builds
'SELECT id, geom FROM edges WHERE id != ' || inhere
. Ifinhere
is not guaranteed to be numeric or sanitized, this could lead to SQL injection.Please confirm that
inhere
is always an integer or properly escaped. If uncertain, sanitize or cast it explicitly.
31-32
: Check input validation for rows_where.SELECT pgr_nodeNetwork('edges', 0.001, the_geom => 'geom', rows_where=>'id in ('||id1||','||id2||')')Same concern as above: ensure
id1
andid2
come from trusted sources and cannot introduce injection.
76-94
: Ensure cost calculation handles 0 or negative costs safely.When splitting edges based on fractions, cost and reverse_cost calculations may become zero or negative if not carefully handled. For real-world data, consider validating that final segment lengths and costs remain non-negative.
docqueries/topology/nodeNetwork.result (2)
6-12
: Output verification.The intersection result shows one row: id1=13, id2=18, point=POINT(3.5 3). This matches the earlier queries in nodeNetwork.pg. The data appears consistent and correct based on the geometry. No concerns here.
129-129
: Confirm zero rows scenario.(0 rows)
This indicates no more intersections found. Ensure that the test environment truly has no additional crossing edges beyond the identified subset. This is expected, but you may want to confirm for real-world data with more edges.
93f53fe
to
ead4e2a
Compare
Fixes #2820 .
Changes proposed in this pull request:
@pgRouting/admins
Summary by CodeRabbit
Documentation
pgr_analyzeOneWay
andpgr_createTopology
to focus on relevant functions and removed references topgr_analyzeGraph
.Refactor
Chore