Changes between Initial Version and Version 5 of Ticket #5500


Ignore:
Timestamp:
2010-09-25T17:29:25+02:00 (14 years ago)
Author:
cmuelle8
Comment:

Replying to stoecker:

nobody wants to reduce node selection quality. we are in the process of experimenting with it, since seb suggested that there is still room for improvement on selecting visually short way segments (this has some history in #5457 already). reducing the node snap distance was a quick try to find out and then document that it cannot be done by a simple change. the tickets document why :)

@Seb: impl of my pseudo code does work, but your suggestion seems all the better:

  • it shrinks the snapCircle for the wayseg to a fifth of its length with the center of the snapCircle lying at the middle_of_nearest_way_segment
  • it honors the case that the nodes might not be part of the way segment (they might be entirely unrelated), by simply not using any near nodes for computation
  • it is almost as precise as my pseudo code. there are some corner cases, where it does not deliver the right answer:
    • imagine a pretty long way segment, so its center lies in a node cloud
    • the snapCircle for the wayseg might then be as big (or bigger) then the circumcircle of the node cloud
    • effectively you then always snap to the way, if the nearest node was not within 4px to p
    • note: the center of the way segment might also lie outside of the node cloud's circumcircle - as long as the snapCircle of the way segment will contain the circumcircle of the nodes, one will wrongly snap to the way segement..
    • see graphic (red node symbolizes clicked point p)

Legend:

Unmodified
Added
Removed
Modified