[PostGIS] #6089: wrong node used when adding a new long line
PostGIS
trac at osgeo.org
Wed Jul 1 02:17:19 PDT 2026
#6089: wrong node used when adding a new long line
--------------------------------+--------------------
Reporter: Lars Aksel Opsahl | Owner: strk
Type: defect | Status: new
Priority: medium | Milestone:
Component: topology | Version: master
Resolution: | Keywords: snap
--------------------------------+--------------------
Comment (by Lars Aksel Opsahl):
The issue in this case is that we only need the upper node. However, since
both nodes fall within the selected tolerance, both are selected, which
matches the current expected behavior as I understand it.
Selecting only the upper node in cases like this would require a new
feature, as I understand your point.
A typical problem when using high snap tolerance values is that we create
many new lines that were never part of the original input. This happens
because we snap to all vertices or nodes within the selected tolerance.
While this behavior is expected, it leads to additional cleanup work
later, especially when removing small sliver polygons.
If snapping were instead limited to the closest node, I believe this could
solve some of these issues and behave more like a line-merge operation. A
key problem today is that we spend significant effort cleaning up sliver
polygons created from what was originally an existing line segment input.
Instead of reusing existing geometry, snapping can generate new lines,
which increases complexity.
The purpose of snapping should ideally be to reduce the number of
geometries—not to create new ones when suitable existing lines are already
available.
I may try to create issue for this.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/6089#comment:10>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list