Ticket #1654 (closed defect: fixed)
Lines added to topology with a tolerance don't get snapped to isolated nodes
| Reported by: | strk | Owned by: | strk |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 2.0.0 |
| Component: | topology | Version: | 2.0.x |
| Keywords: | Cc: |
Description
See this session:
SELECT CreateTopology('tt');
SELECT ST_AddIsoNode('tt', 0, 'POINT(0 0)');
SELECT TopoGeo_addLineString('tt', 'LINESTRING(-10 1, 10 1)', 2);
SELECT TopologySummary('tt');
The linestring is at distance=1 from the point, should be snapped to it since we request tolerance=2.
Debugging:
strk=# SELECT TopoGeo_addLineString('tt', 'LINESTRING(-10 1, 10 1)', 2);
DEBUG: Self-noded: LINESTRING(-10 1,10 1)
DEBUG: WITH nearby AS ( SELECT e.geom FROM tt.edge e WHERE ST_DWithin(e.geom, '01020000000200000000000000000024C0000000000000F03F0000000000002440000000000000F03F'::geometry, 2) ) SELECT st_collect(geom) FROM nearby;
DEBUG: WITH nearby AS ( SELECT n.geom FROM tt.node n WHERE ST_DWithin(n.geom, '01020000000200000000000000000024C0000000000000F03F0000000000002440000000000000F03F'::geometry, 2) ) SELECT (st_dump(st_unaryunion(st_collect(geom)))).geom FROM nearby;
DEBUG: Split by POINT(0 0): MULTILINESTRING((-10 1,10 1))
So the code does realize it should _split_ the line, but fails at doing it because the point is not _on_ the line, a snap should fix.
Change History
Note: See
TracTickets for help on using
tickets.
