pgr_nodeNetwork
has many open issues:
What I can see:
edges_noded
edges
table
edges_noded
the_geom
columnformat
functionOK
or FAIL
text messagerows_where
parameter
Never the less it is a useful function when there are problematic segments in the graph.
The deprecation should be done in steps as follows:
Step 1New utility functions:
pgr_separateCrossing(edges SQL, tolerance, dryrun)
- Breaks the edges that cross each otherpgr_separateTouching(edges SQL, tolerance, dryrun)
- breaks the edges that touch each other or the dead end is very close to an edgeExample execution (using the Sample Data of the documentation):pgr_separateCrossing
SELECT seq, id, sub_id, ST_AsText(geom)
FROM pgr_separateCrossing('SELECT id, geom FROM edges');
seq | id | sub_id | st_astext
-----+----+--------+---------------------------
1 | 13 | 1 | LINESTRING(3 3,3.5 3)
2 | 13 | 2 | LINESTRING(3.5 3,4 3)
3 | 18 | 1 | LINESTRING(3.5 2.3,3.5 3)
4 | 18 | 2 | LINESTRING(3.5 3,3.5 4)
(4 rows)
pgr_separateTouching
SELECT seq, id, sub_id, ST_AsText(geom)
FROM pgr_separateTouching('SELECT id, geom FROM edges');
seq | id | sub_id | st_astext
-----+----+--------+------------------------------------
1 | 14 | 1 | LINESTRING(2 3,1.999999999999 3.5)
2 | 14 | 2 | LINESTRING(1.999999999999 3.5,2 4)
(2 rows)
Assuming the edges
table already has:
old_id
The user, for example can add the new segments to the edges
table.
INSERT INTO edges (old_id, geom)
SELECT id, geom
FROM pgr_separateCrossing('SELECT id, geom FROM edges');
The rest, like updating the new segments 's costs, source, and target columns, tags, etc will depend on the application requirements.
Step 2Rewrite pgr_nodeNetwork
edges
and/or edges_noded
edges_noded
when the table existspgr_separateCrossing
and pgr_separateTouching
internallyDeprecate pgr_nodeNetwork
on v3.8.0
pgr_separateCrossing
and pgr_separateTouching
On v4.0.0 remove the pgr_nodeNetwork
code
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4